/* --- Variables & Reset --- */
:root {
    --primary-color: #0f172a; 
    --secondary-color: #2563eb; 
    --accent-color: #f59e0b; 
    --text-color: #334155;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }
body { color: var(--text-color); line-height: 1.6; overflow-x: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.bg-light { background-color: var(--light-bg); }
.text-center { text-align: center; }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--primary-color); font-weight: 700; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.5rem; position: relative; display: inline-block; margin-bottom: 10px; }
.section-title h2::after {
    content: ''; position: absolute; width: 50px; height: 3px; background: var(--secondary-color); bottom: -5px; left: 50%; transform: translateX(-50%);
}

/* --- Navigation --- */
nav { position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; background: transparent; transition: var(--transition); padding: 20px 0; }
nav.scrolled { background: var(--white); box-shadow: 0 5px 15px rgba(0,0,0,0.1); padding: 15px 0; }
nav.scrolled .logo, nav.scrolled .nav-links { color: var(--primary-color); }

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--white); text-decoration: none; transition: var(--transition); }
.nav-menu { display: flex; list-style: none; align-items: center; }
.nav-links { color: var(--white); text-decoration: none; padding: 0 15px; font-weight: 600; transition: var(--transition); }
.nav-links:hover { color: var(--secondary-color); }

.btn-nav { background: var(--secondary-color); padding: 10px 20px; border-radius: 5px; color: var(--white) !important; margin-left: 15px; }
.btn-nav:hover { background: var(--accent-color); transform: translateY(-2px); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--white); }
nav.scrolled .bar { background-color: var(--primary-color); }

/* --- Hero Section --- */
.hero { 
    height: 100vh; 
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('images/photo-1525625293386-3f8f99389edd.jpeg') center/cover; 
    display: flex; 
    align-items: center; 
    text-align: center; 
}
.hero-content { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.hero h1 { color: var(--white); font-size: 3.5rem; margin-bottom: 20px; }
.hero p { color: #e2e8f0; font-size: 1.2rem; margin-bottom: 30px; }

.btn-primary {
    display: inline-block; background: var(--secondary-color); color: var(--white); padding: 15px 35px; text-decoration: none; font-weight: 600; border-radius: 5px; border: none; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; font-size: 1.1rem;
}
.btn-primary:hover { background: var(--accent-color); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* --- Split Sections (Detailed Services) --- */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; } /* Keeps text readable LTR */
.split-text h2 { font-size: 2.2rem; margin-bottom: 15px; }
.divider { width: 60px; height: 4px; background: var(--secondary-color); margin-bottom: 25px; border-radius: 2px; }
.split-text p { font-size: 1.1rem; margin-bottom: 25px; }
.split-text ul { list-style: none; }
.split-text ul li { margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; }
.split-text ul li i { color: var(--secondary-color); margin-right: 15px; font-size: 1.2rem; }
.split-img img { width: 100%; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); transition: var(--transition); }
.split-img img:hover { transform: scale(1.03); }

/* About Override */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image img { width: 100%; border-radius: 10px; }

/* --- Contact Page Header --- */
.page-header { background: var(--primary-color); padding: 150px 0 80px; color: var(--white); }
.page-header h1 { color: var(--white); font-size: 3rem; margin-bottom: 10px; }

/* --- Professional Contact Form --- */
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; margin-top: -40px; position: relative; z-index: 10; }
.contact-card { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 10px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); 
    text-align: center; 
    height: 100%;            /* Changes height from fit-content to full grid height */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the address elements inside the tall box */
    align-items: center;     /* Horizontally centers the elements */
}
.contact-card .icon-wrap { width: 70px; height: 70px; background: rgba(37, 99, 235, 0.1); color: var(--secondary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 20px; }

.contact-form-card { background: var(--white); padding: 50px; border-radius: 10px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); }
.modern-form { width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Floating Labels Animation Setup */
.floating-group { position: relative; margin-bottom: 40px; }
.floating-group input, .floating-group textarea {
    width: 100%; padding: 10px 0; font-size: 1rem; color: var(--primary-color); border: none; border-bottom: 1px solid #cbd5e1; outline: none; background: transparent; transition: all 0.3s;
}
.floating-group textarea { resize: vertical; min-height: 100px; }

.floating-group label {
    position: absolute; top: 10px; left: 0; color: #94a3b8; font-size: 1rem; pointer-events: none; transition: 0.3s ease all;
}

/* Form Animation Logic */
.floating-group input:focus ~ label, 
.floating-group input:valid ~ label,
.floating-group textarea:focus ~ label,
.floating-group textarea:valid ~ label {
    top: -20px; font-size: 0.85rem; color: var(--secondary-color); font-weight: 600;
}

.focus-border { position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--secondary-color); transition: 0.4s; }
.floating-group input:focus ~ .focus-border,
.floating-group textarea:focus ~ .focus-border { width: 100%; transition: 0.4s; }

.animated-btn { width: 100%; display: flex; justify-content: center; align-items: center; margin-top: 20px; }

/* --- Full Width Map --- */
.full-width-map { width: 100%; height: 450px; line-height: 0; }
.full-width-map iframe { width: 100%; height: 100%; border: none; filter: grayscale(20%); transition: var(--transition); }
.full-width-map iframe:hover { filter: grayscale(0%); }

/* --- Footer --- */
footer { background: var(--primary-color); color: var(--white); padding: 60px 0 20px; }
.footer-container { display: grid; grid-template-columns: 1fr 2fr; gap: 150px; margin-bottom: 40px; }
.footer-about h3, .footer-links h4 { color: var(--white); margin-bottom: 20px; }
.footer-links h4 { position: relative; }
.footer-links h4::after { content: ''; position: absolute; width: 30px; height: 2px; background: var(--secondary-color); bottom: -8px; left: 0; }

/* Horizontal Navbar Fix for Footer */
.horizontal-links { 
    list-style: none; 
    display: grid; 
    grid-template-columns: repeat(3, auto); /* Creates 3 columns, forcing 2 lines */
    row-gap: 15px;
    column-gap: 30px;
}

.horizontal-links li {
    display: flex;
    align-items: center; /* Vertically centers the dot with the text */
}

/* Creates the black dot */
.horizontal-links li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color); /* Change to #ffffff if it is too hard to see */
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.horizontal-links a { 
    color: #cbd5e1; 
    text-decoration: none; 
    transition: var(--transition); 
    font-weight: 500; 
}

.horizontal-links a:hover { 
    color: var(--accent-color); 
}
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #94a3b8; font-size: 0.9rem; }

/* --- Scroll to Top --- */
#scrollToTopBtn { position: fixed; bottom: 30px; right: 30px; background: var(--secondary-color); color: var(--white); width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; display: none; justify-content: center; align-items: center; font-size: 1.5rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 99; transition: var(--transition); }
#scrollToTopBtn:hover { background: var(--accent-color); transform: translateY(-5px); }

/* --- Scroll Animations --- */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.fade-up { transform: translateY(50px); }
.fade-left { transform: translateX(-50px); }
.fade-right { transform: translateX(50px); }

/* --- Responsive Layout --- */
@media (max-width: 992px) {
    .split-section { grid-template-columns: 1fr; gap: 40px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-menu { position: absolute; top: 100%; left: -100%; flex-direction: column; background: var(--white); width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav-menu.active { left: 0; }
    .nav-links { color: var(--primary-color); display: block; padding: 20px; }
    .btn-nav { display: inline-block; margin: 10px 0 20px 0; }
    .menu-toggle { display: block; }
    nav .bar { background-color: var(--primary-color); }
    nav:not(.scrolled) .logo { color: var(--primary-color); }
    .hero h1 { font-size: 2.5rem; }
    .form-row { grid-template-columns: 1fr; }
    .horizontal-links { grid-template-columns: 1fr; row-gap: 15px; }
}

/* --- Expanded About Section --- */
.about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-row.reverse {
    direction: rtl; /* Flips the layout visually */
}

.about-row.reverse > * {
    direction: ltr; /* Keeps text reading normally from left to right */
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #475569;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Adds a sophisticated visual difference between the two images */
.img-offset img {
    border-radius: 40px 12px 40px 12px; 
}

/* Company Stats Strip */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    text-align: center;
    margin-top: 40px;
    border-top: 4px solid var(--secondary-color);
}

.stat-item h4 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Add a plus sign after numbers for extra flair */
.stat-item h4::after {
    content: '+';
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-left: 2px;
}

.stat-item p {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Mobile Responsiveness for About */
@media (max-width: 992px) {
    .about-row, .about-row.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
        direction: ltr; /* Reset direction on mobile */
    }
    .about-row.reverse .about-image {
        order: -1; /* Forces the image to stay on top on mobile */
    }
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .about-stats {
        grid-template-columns: 1fr;
    }
}