/* --- 1. GLOBAL RESET AND VARIABLES --- */

:root {
    --primary-color: #007bff; /* Bright Blue (Base for Gradient Blue) */
    --secondary-color: #212529; /* Black */
    --accent-color: #ffc107; /* Yellow for highlights */
    --text-dark: #343a40;
    --text-light: #f8f9fa;
    --bg-light: #ffffff;
    --bg-dark: #212529;
    --section-padding: 80px 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

.cta-button {
    display: inline-block;
    /* Gradient blue background */
    background: linear-gradient(45deg, #007bff, #0056b3); 
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background: linear-gradient(45deg, #0056b3, #007bff);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* --- 2. HEADER AND NAVBAR --- */

header {
    background-color: var(--secondary-color); /* Black secondary color */
    color: var(--text-light);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color); /* Highlight logo with Yellow */
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color); /* Highlight active link with Yellow */
    border-bottom: 2px solid var(--accent-color);
}

/* --- 3. HERO SECTION --- */

.hero {
    /* Background gradient for the hero section based on your theme */
    background: linear-gradient(135deg, #0056b3, #007bff); 
    color: var(--text-light);
    text-align: center;
    padding: 120px 0;
    position: relative;
}

.hero.hero-small {
    /* Reduced padding for a smaller banner on inner pages like Contact */
    padding: 80px 0; 
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.hero .tagline {
    font-size: 1.5em;
    margin-bottom: 40px;
    font-weight: 300;
}

/* --- 4. SERVICES AND AI SOLUTIONS (Updated for new layout) --- */

.services-overview,
.ai-solutions,
.advantages {
    padding: var(--section-padding);
}

/* New styles for the alternating service blocks */
.service-feature-block {
    display: flex;
    align-items: center; /* Vertically align content */
    gap: 40px;
    margin-bottom: 60px; /* Space between blocks */
    background: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.service-feature-block:last-child {
    margin-bottom: 0; /* No margin after the last block */
}

.service-feature-block.reverse {
    flex-direction: row-reverse; /* Swap order for image/text */
}

.feature-image {
    flex: 1; /* Take up equal space */
    min-width: 300px; /* Ensure image block doesn't get too small */
    text-align: center; /* Center image within its container */
}

.service-lg-img {
    max-width: 100%; /* Make image responsive */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-lg-img:hover {
    transform: scale(1.02);
}

.feature-content {
    flex: 2; /* Take up more space than image */
}

.feature-content h3 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-content p {
    font-size: 1.1em;
    color: var(--text-dark);
}

/* Styles for other service grids (like on About page) */
.services-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}
.service-card { 
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    border-top: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}
.service-card:hover { 
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.service-icon-img { 
    width: 100px;
    height: 100px; 
    object-fit: cover; 
    margin-bottom: 20px;
    border-radius: 10px;
    border: 3px solid var(--primary-color); 
}


/* AI Solutions Specific Styles */
.ai-solutions {
    background-color: #f4f7f6;
    text-align: center;
}

.ai-solutions .subtitle {
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 50px;
}

.ai-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.ai-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    flex: 1;
    max-width: 350px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.ai-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.ai-card h3 {
    margin-bottom: 15px;
}

.ai-cta-bar {
    background-color: var(--secondary-color); /* Black bar */
    color: var(--text-light);
    padding: 20px 40px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
}

.ai-cta-bar p {
    margin: 0;
    font-size: 1.1em;
}

.ai-cta {
    background-color: var(--accent-color); /* Yellow highlight button */
    color: var(--secondary-color);
    padding: 10px 20px;
    font-weight: bold;
}

.ai-cta:hover {
    background-color: #e9b300;
}

/* --- 5. ADVANTAGES SECTION --- */

.advantages {
    background-color: var(--bg-light);
    text-align: center;
}

.advantage-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.advantage-card {
    flex: 1 1 300px;
    padding: 30px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.advantage-icon {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.advantage-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.advantage-cta {
    color: var(--primary-color);
    font-size: 0.9em;
    display: block;
    margin-top: 15px;
}

/* --- 6. FOOTER STYLES --- */

.footer-section {
    background-color: var(--secondary-color); /* Black secondary color */
    color: var(--secondary-color);
    padding: 40px 0 20px;
    font-size: 0.9em;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo-block {
    flex: 1;
    min-width: 200px;
}

.footer-info {
    flex: 1;
    min-width: 250px;
}

.footer-logo-text {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color); /* Highlight logo with Yellow */
}

.footer-info p {
    margin-bottom: 8px;
    color: #ced4da; /* Light gray text for contrast on black background */
}

.footer-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-social {
    flex: 1;
    text-align: right;
    min-width: 150px;
}

.footer-social a {
    color: var(--text-light);
    font-size: 1.5em;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent-color); /* Yellow hover */
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #495057;
    padding-top: 20px;
    margin-top: 20px;
    color: #ced4da;
}

/* --- 7. RESPONSIVE DESIGN --- */

@media (max-width: 992px) { /* Adjusted breakpoint for service blocks */
    .navbar .container {
        flex-direction: column;
        text-align: center;
    }

    .nav-menu {
        margin-top: 15px;
        padding: 0;
        justify-content: center;
    }

    .nav-menu li {
        margin: 0 10px;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }

    .hero .tagline {
        font-size: 1.2em;
    }

    /* Service Feature Block responsive layout */
    .service-feature-block {
        flex-direction: column; /* Stack image and text vertically */
        text-align: center;
    }

    .service-feature-block.reverse {
        flex-direction: column; /* Keep stacked for reverse as well */
    }

    .feature-image, .feature-content {
        min-width: unset; /* Remove min-width constraint */
        flex: auto; /* Allow content to adjust naturally */
    }

    .ai-grid {
        flex-direction: column;
        align-items: center;
    }

    .ai-cta-bar {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .ai-cta-bar p {
        margin-bottom: 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo-block,
    .footer-info,
    .footer-social {
        width: 100%;
        text-align: center;
    }

    .footer-social a {
        margin: 0 10px;
    }
    
    /* Contact page responsive */
    .contact-grid {
        flex-direction: column;
    }
}

/* --- 8. ADMIN MODE STYLES (REQUIRED FOR admin.js) --- */

/* Visual cue for editable fields when admin mode is ON */
body.admin-mode .editable {
    cursor: pointer !important;
    position: relative;
}

/* Hover effect on editable elements */
body.admin-mode .editable:hover {
    box-shadow: 0 0 0 2px var(--accent-color); /* Yellow glow */
    border-radius: 4px;
    background-color: rgba(255, 193, 7, 0.1); /* Slight yellow hint */
}

/* Force the cursor for text entry when actively editing */
body.admin-mode .editable[contenteditable="true"] {
    cursor: text !important;
}

/* Highlight the main body to indicate admin mode is active */
body.admin-mode {
    border-top: 5px solid var(--accent-color); /* Yellow bar at the top */
}

/* Ensure the Admin button is hidden initially on the page load.
   The JS will override this when admin mode is enabled. */
#adminToggle {
    display: none !important; 
    background-color: var(--secondary-color) !important; 
    color: var(--accent-color) !important;
    border: 1px solid var(--accent-color) !important;
    z-index: 10000;
}
/* --- Styling adjustments for Hero Taglines (as requested) --- */
.hero-content .tagline {
    /* Ensures it stays on one line if content allows */
    display: inline-block; 
    
    /* Center the block if it doesn't span full width */
    margin-left: auto;
    margin-right: auto;
    
    /* Make it distinct (using black text on a contrasting background) */
    font-size: 1.25rem; /* Slightly larger */
    font-weight: bold;
    color: black;
    background-color: white; 
    padding: 5px 15px;
    border-radius: 5px;
    
    /* If the text is editable, ensure the styling applies when empty or short */
    min-width: 50%; 
    text-align: center;
}

/* Ensure the hero title/tagline text is centered */
.hero-content {
    text-align: center;
}