/* ------------------------------------------------------------------- */
/* 1. BRAND COLORS & GLOBAL RESET
/* ------------------------------------------------------------------- */

:root {
    /* codeYcoder Brand Colors */
    --color-navy: #0A244A;        /* Primary Dark Color */
    --color-green: #3CE7A5;       /* Primary Accent (Vibrant Green) */
    --color-green-dark: #2BBF87;  /* Hover/Darker Green */
    --color-light-gray: #f8f8f8;  /* Background for sections */
    --color-white: #ffffff;
    --color-text: #333333;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-white);
}

a {
    text-decoration: none;
    color: var(--color-green-dark);
    transition: color 0.3s;
}

a:hover {
    color: var(--color-navy);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    line-height: 1.2;
    margin-bottom: 0.5em;
    font-weight: 700;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utility Classes */
.bg-navy { background-color: var(--color-navy) !important; }
.text-white { color: var(--color-white) !important; }
.text-green { color: var(--color-green) !important; }
.bg-light-gray { background-color: var(--color-light-gray) !important; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }


/* ------------------------------------------------------------------- */
/* 2. NAVIGATION & HEADER (Includes Mobile Menu Fix)
/* ------------------------------------------------------------------- */

header {
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 40px; 
}

/* NEW MOBILE MENU ELEMENTS */
.menu-toggle {
    display: none; /* Hide the actual checkbox */
}

.menu-icon {
    display: none; /* Hidden by default on desktop */
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-navy);
}

.main-menu {
    list-style: none;
    display: flex; /* Desktop layout */
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.main-menu li a {
    color: var(--color-navy);
    padding: 10px 15px;
    display: block;
    font-weight: 500;
    transition: color 0.3s;
}

.main-menu li a:hover {
    color: var(--color-green);
    text-decoration: none;
}

/* Dropdown Styles (for Services menu) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-white);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
    border-top: 3px solid var(--color-green);
}

.dropdown-content a {
    color: var(--color-navy);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: var(--color-light-gray);
    color: var(--color-green-dark);
}

.dropdown:hover .dropdown-content {
    display: block;
}


/* ------------------------------------------------------------------- */
/* 3. BUTTONS (CALL TO ACTION)
/* ------------------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-primary-green {
    background-color: var(--color-green);
    color: var(--color-navy);
    border-color: var(--color-green);
}

.btn-primary-green:hover {
    background-color: var(--color-green-dark);
    border-color: var(--color-green-dark);
    color: var(--color-navy);
    text-decoration: none;
}

.btn-outline-white-border {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline-white-border:hover {
    background-color: var(--color-white);
    color: var(--color-navy);
    text-decoration: none;
}

.btn-dark-navy {
    background-color: var(--color-navy);
    color: var(--color-white);
    border-color: var(--color-navy);
}

.btn-dark-navy:hover {
    background-color: #000;
    border-color: #000;
}

/* ------------------------------------------------------------------- */
/* 4. GRID SYSTEM (CRUCIAL FOR LAYOUT)
/* ------------------------------------------------------------------- */

.row {
    display: flex; 
    flex-wrap: wrap; 
    margin-left: -15px; 
    margin-right: -15px;
}

/* Base column padding and spacing */
.row > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Large Device Columns */
.col-lg-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-lg-3 { flex: 0 0 25%; max-width: 25%; }
.col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }

/* Medium Device Columns */
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* Small Device/Full Width Columns */
.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ------------------------------------------------------------------- */
/* 5. HOMEPAGE & SERVICE SECTIONS */
/* ------------------------------------------------------------------- */

.hero-section {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-section h1 {
    color: var(--color-white); 
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-section p.lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

/* Service Pillar Cards */
.services-pillar-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.lead-text {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 3rem;
}

.service-card {
    background-color: var(--color-white);
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%; /* Ensures equal height in the flex row */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(10, 36, 74, 0.15); 
}

.border-top-green {
    border-top: 5px solid var(--color-green);
}

.service-icon {
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.read-more-link {
    font-weight: 600;
    margin-top: 15px;
    display: block;
}

/* General Content Page Styling */
.main-service-content article {
    font-size: 1.05rem;
}

.sidebar {
    padding-left: 30px;
}

.cta-box {
    color: var(--color-white);
    padding: 25px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.cta-box h3 {
    color: var(--color-green);
}

/* ------------------------------------------------------------------- */
/* 6. CONTACT FORM STYLES */
/* ------------------------------------------------------------------- */

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--color-navy);
    box-shadow: 0 0 0 0.2rem rgba(10, 36, 74, 0.25);
    outline: none;
}

.contact-info-sidebar {
    border-radius: 5px;
}

.map-placeholder {
    background-color: #ccc;
    height: 250px;
    margin-top: 20px;
}

/* ------------------------------------------------------------------- */
/* 7. FOOTER REFINEMENT */
/* ------------------------------------------------------------------- */

footer {
    background-color: #1a1a1a;
    color: #bbb;
    padding: 40px 0;
    font-size: 0.9rem;
}

footer a {
    color: var(--color-green);
    text-decoration: none;
}

footer a:hover {
    color: var(--color-green-dark);
}

footer h4 {
    color: var(--color-white); /* Ensures headings stand out on dark background */
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

footer ul {
    list-style: none;
    padding-left: 0;
}

footer ul li {
    margin-bottom: 8px;
}

.social-icons a {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--color-green);
}


/* ------------------------------------------------------------------- */
/* 8. MEDIA QUERIES (Responsive Design for Mobile View)
/* ------------------------------------------------------------------- */

/* Breakpoint for Tablets and below (max-width: 992px) */
@media (max-width: 992px) {
    
    /* Navigation Adjustments */
    .main-nav {
        flex-direction: row; /* Keep logo and icon side-by-side */
        justify-content: space-between; 
        align-items: center;
    }
    
    .menu-icon {
        display: block; /* Show the hamburger icon */
    }

    /* Mobile Menu Styling (Collapsible Menu) */
    .main-menu {
        position: absolute;
        top: 70px; /* Position below the header */
        left: 0;
        width: 100%;
        height: auto;
        background-color: var(--color-white);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        flex-direction: column; /* Stack menu items vertically */
        padding: 10px 0;
        transform: translateY(-200%); /* Start off-screen (hides the menu) */
        transition: transform 0.3s ease-in-out;
    }

    .main-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--color-light-gray);
    }
    
    /* Checkbox Trick: When the toggle is checked, slide the menu down */
    #menu-toggle:checked ~ .main-menu {
        transform: translateY(0);
    }
    
    /* Grid System Adjustment: All columns stack on tablets */
    .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-7, .col-lg-8, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 25px; /* Add spacing between stacked columns */
    }

    /* Service Card Stacking Fix */
    .services-pillar-section .row {
        justify-content: center;
    }
    
    /* Contact Page Sidebar Stacking */
    .sidebar {
        padding-left: 15px; 
    }
}

/* Breakpoint for Phones (max-width: 576px) */
@media (max-width: 576px) {
    
    .container {
        width: 95%; /* Use more width on small phones */
    }
    
    /* Hero button size adjustment */
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
        display: block; /* Make CTA buttons stack vertically */
        margin: 10px 0 !important; 
    }
    
    /* CTA Banner Stacking */
    .cta-banner .container {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-banner h3 {
        margin-bottom: 15px !important;
    }
    
    /* Footer Styling (Ensuring text is centered when columns stack) */
    footer {
        text-align: center;
    }
    
    footer .col-lg-4, footer .col-lg-3, footer .col-lg-5 {
        text-align: center;
    }
    
    /* Ensures Quick Links list is centered on mobile */
    footer ul {
        display: inline-block;
    }
}

/* ------------------------------------------------------------------- */
/* 4. GRID SYSTEM (CRUCIAL FOR LAYOUT) - Ensure these are present! */
/* ------------------------------------------------------------------- */

.row {
    display: flex; 
    flex-wrap: wrap; 
    /* ... rest of .row styles ... */
}

/* ... (col-lg-* definitions) ... */

/* Medium Device Columns - These MUST be defined for the layout in pages/services.php */
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* ... (col-12 definition) ... */
/* ------------------------------------------------------------------- */
/* 8. MEDIA QUERIES (Responsive Design for Mobile View) */
/* ------------------------------------------------------------------- */

/* Breakpoint for Tablets and below (max-width: 992px) */
@media (max-width: 992px) {
    
    /* ... (Navigation and other mobile styles remain the same) ... */

    /* EXPLICIT GRID SYSTEM STACKING (Mobile/Tablet View) */
    /* Forces all columns to take full width and stack vertically */
    .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-7, .col-lg-8, 
    .col-md-4, .col-md-6, .col-md-8, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 25px; 
    }

    /* ... (rest of the media query remains the same) ... */
}

/* --- New Homepage Styles --- */

/* Ensures icons and text align properly in Why Choose Us section */
.why-us-section .d-flex {
    display: flex;
    align-items: flex-start;
}
.why-us-section .me-3 {
    margin-right: 1rem !important;
}

/* Style for Technology Icons */
.tech-snapshot .tech-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    height: 100%;
}
.tech-snapshot .tech-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-green);
}

/* Ensuring the final CTA uses flex properties correctly for wrapping on mobile */
.cta-banner {
    /* Use the existing bg-navy style */
}
.cta-banner h3 {
    color: var(--color-white);
    font-size: 1.5rem;
}
/* Mobile adjustment for CTA h3 and button (already covered, but good to ensure) */
@media (max-width: 768px) {
    .cta-banner .container {
        flex-direction: column;
        text-align: center;
    }
    .cta-banner h3 {
        margin-bottom: 15px !important;
    }
}

/* ------------------------------------------------------------------- */
/* 9. FLOATING CONTACT BUTTONS (FAB) */
/* ------------------------------------------------------------------- */

.floating-cta-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensure it stays above everything else */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
    transition: transform 0.3s, opacity 0.3s;
}

.floating-btn:hover {
    transform: scale(1.1);
}

/* WhatsApp Button Style */
.whatsapp-btn {
    background-color: #25D366; /* WhatsApp Green */
}

/* Call Button Style */
.call-btn {
    background-color: var(--color-navy); /* Your primary dark color */
}

/* Hide the call button on large screens, as click-to-call is primarily for mobile */
.floating-cta-container .mobile-only {
    display: none;
}

/* Media Query for Mobile: Show the Call Button */
@media (max-width: 768px) {
    .floating-cta-container .mobile-only {
        display: flex; /* Show the call button on mobile */
    }
    .floating-cta-container {
        bottom: 15px;
        right: 15px;
    }
}