/* =====================================================
   1. GLOBAL VARIABLES & RESET
===================================================== */
:root {
    --nirom-teal: #23494c;
    --nirom-gold: #f2d24b;
    --nirom-dark: #111111;
    --nirom-white: #ffffff;
    --nirom-bg: #f8fafb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    color: #222;
    background: var(--nirom-white);
    overflow-x: hidden;
}

a { text-decoration: none; transition: 0.3s; }
ul { padding-left: 18px; }

/* =====================================================
   2. HEADER & NAVIGATION
===================================================== */
.topbar {
    background: var(--nirom-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    transition: height 0.3s;
}

.topbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo { height: 80px; width: auto; transition: 0.3s; }

.nav a, .nav .dropbtn {
    color: var(--nirom-gold);
    margin-left: 18px;
    font-size: 14px;      /* Matches the dropdown font size */
    font-weight: 500;
    text-transform: none; /* Removes all-caps */
    display: inline-block;
}

/* General Menu Toggle Style */
.menu-toggle {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
}

.bar {
    width: 25px;
    height: 4px;
    background-color: var(--nirom-gold, #d4af37); /* Uses your gold variable, falls back to gold hex */
    display: block;
    margin: 4px 0; /* Creates the spacing between the lines */
    transition: 0.3s; /* Makes the color or animation smooth */
    border-radius: 2px; /* Softens the edges of the bars */
}

/* Ensure they stay gold even when the menu is active */
.menu-toggle.active .bar {
    background-color: var(--nirom-gold, #d4af37);
}

/* Header Shrink on Scroll */
.topbar.shrink { height: 64px; }
.topbar.shrink .logo { height: 56px; }

/* 1. The Parent Container: Controls size and spacing */
.hero-title {
    font-size: 30px;
    margin-bottom: 5px;
    line-height: 1.2;
    font-weight: 700;
}

/* 2. The Main Part: Stays White */
.hero-title-main {
    color: #ffffff;
}

/* 3. The Accent Part: Turns Gold */
.hero-title-accent {
    color: #f2d24b;
    margin-left: 5px; /* Adds a tiny gap between the two words */
}

/* =====================================================
   3. DROPDOWN SYSTEM
===================================================== */
.dropdown { position: relative; display: inline-block; vertical-align: top; }

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--nirom-teal);
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
    z-index: 100;
    top: 100%;
    left: 0;
    border-top: 2px solid var(--nirom-gold);
}

.dropdown-content a {
    color: var(--nirom-gold) !important;
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;      /* Exact match to parent */
    text-transform: none; /* First letter Cap via HTML */
}

.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a:hover { background: rgba(255,255,255,0.1); padding-left: 25px; }
.dropdown-content a:last-child { border-bottom: none; }

/* =====================================================
   4. BANNERS & HERO
===================================================== */
.hero, .page-banner {
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    color: var(--nirom-white);
}

.hero {
    min-height: 200px;
    background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('/images/banner-home-tyre-airspring.jpg');
}

.page-banner { height: 220px; }

/* Banner Variants */
.banner-services { background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('/images/banner-services-tyre-process.jpg'); }
.banner-insights { background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('/images/banner-insights-quality-analysis.jpg'); }
.banner-profile { background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('/images/banner-profile-factory-experience.jpg'); }
.banner-contact { background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('/images/banner-contact-factory.jpg'); }

.hero-box, .banner-overlay { padding: 20px 32px; max-width: 100%; }

.hero-title, .banner-overlay h1 {
    font-size: 30px;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

/* =====================================================
   5. GRID SYSTEM & CARDS
===================================================== */
.section-main { padding: 20px; max-width: 1200px; margin: 0 auto; }

.grid, #insights-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px 0;
}

.insight-card, .service-card, .case-card {
    background: var(--nirom-white);
    border: 1px solid #eef0f2;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    position: relative;
}

/* Featured / Highlighted State */
.featured, .featured-highlight {
    background: #fdfbf2 !important;
    border: 1px solid var(--nirom-gold) !important;
    box-shadow: 0 4px 15px rgba(242, 210, 75, 0.2);
    transform: translateY(-5px);
}

.featured-label {
    color: var(--nirom-gold);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

/* =====================================================
   6. COMPONENTS (FAQ, FORMS, FLOATS)
===================================================== */
.faq-item { border-bottom: 1px solid #eee; }
.faq-question {
    width: 100%; text-align: left; padding: 15px 0;
    background: none; border: none; font-weight: bold; cursor: pointer;
    display: flex; justify-content: space-between;
}

.whatsapp-float {
    position: fixed; bottom: 25px; right: 25px;
    background: #25d366; color: #fff; border-radius: 50px;
    padding: 12px 24px; font-weight: bold; z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* =====================================================
   7. FOOTER
===================================================== */

.footer-banner {
    background-color: #f2d24b; /* Your signature NIROM Gold */
    width: 100%;
    padding: 5px 0;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5px;
    
    /* Forces single line layout */
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    white-space: nowrap; /* Prevents text from breaking into two lines */
    
    /* Font Styling */
    color: #23494c; /* Dark teal text for high contrast on gold */
    font-size: 12px;
    font-weight: 700;
}

/* Optional: Adds a separator between the items for better readability */
.footer-center {
    padding: 0 5px;
    text-align: center;
    border-left: 1px solid rgba(35, 73, 76, 0.2);
    border-right: 1px solid rgba(35, 73, 76, 0.2);
}

/* =====================================================
   NIROM INC - RESTORED & CONSOLIDATED STYLES
===================================================== */

/* 1. CALL TO ACTION (CTA) & BUTTONS */
.cta-section-professional {
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #e1e8ed;
}

.cta-btn-professional {
    display: inline-block;
    background: var(--nirom-teal);
    color: #ffffff !important;
    padding: 14px 35px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.cta-btn-professional:hover {
    background: var(--nirom-gold);
    color: var(--nirom-teal) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 2. FORM COMPONENTS & ALERTS */
.confidential-note {
    background: #eef3f4;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--nirom-gold);
    width: 100%;
    box-sizing: border-box;
}

.char-counter {
    font-size: 11px;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

/* 3. GRID & CARD REFINEMENTS */
.grid .service-card:nth-child(even) {
    background-color: #f9f9f9; 
    border-left: 4px solid var(--nirom-teal); 
}

.card-tag {
    font-size: 11px;
    font-weight: bold;
    color: var(--nirom-teal);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: inline-block;
    text-transform: uppercase;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--nirom-teal);
    font-weight: bold;
    text-decoration: underline;
}

.read-more:hover {
    color: var(--nirom-gold);
    text-decoration: none;
}

/* 4. HEADER & STATUS ELEMENTS */
.status-badge {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.75rem;
}

/* 5. LEGAL MODAL (IN-PAGE POPUP) */
.legal-modal {
    display: none; 
    position: fixed; 
    z-index: 10000; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
}

.legal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

.legal-header {
    background: var(--nirom-teal);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-body {
    padding: 30px;
    overflow-y: auto;
    color: #333;
    line-height: 1.7;
}

.close-legal {
    color: var(--nirom-gold);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

/* 6. WHATSAPP FLOATING BUTTON */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: translateY(-3px);
    color: #ffffff;
}

/* =====================================================
   8. RESPONSIVE DESIGN (MOBILE FIXES)
===================================================== */
@media (max-width: 900px) {
    .grid, #insights-container { grid-template-columns: repeat(2, 1fr); }
    
    .nav {
        position: absolute; top: 64px; right: 0; width: 100%;
        background: var(--nirom-dark); flex-direction: column; display: none;
    }
    .nav.show { display: flex; }
    .nav a, .dropbtn { margin: 0; padding: 15px 20px; border-bottom: 1px solid #222; width: 100%; }
    .menu-toggle { display: block; }
    
    .hero-title, .banner-overlay h1 { font-size: 24px !important; }
}

@media (max-width: 480px) {
    .grid, #insights-container, .fs-form { grid-template-columns: 1fr !important; }
    .hero-title { font-size: 20px !important; }
    .status-badge { display: none !important; }
}

/* Mobile Fix: If the screen is too narrow for one line, we slightly scale down the font */
@media (max-width: 768px) {
    .footer-banner-inner {
        font-size: 10px;
        padding: 0 10px;
    }
}

/* Mobile Specific Logic */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Show 3-line button on mobile */
    }

    .nav {
        display: none; /* Hide links on mobile initially */
        flex-direction: column;
    }

    /* This class is added by the script to show the menu */
    .nav.show {
        display: flex !important;
    }

    /* Show dropdown content when active class is added by script */
    .dropdown.active .dropdown-content {
        display: block;
    }
}

/* 1. General Styles */
.footer-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* This allows items to move to the next line */
    gap: 10px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box; /* Ensures padding doesn't push width over 100% */
}

/* 2. Mobile Specific Fix */
@media (max-width: 768px) {
    .footer-banner-inner {
        flex-direction: column; /* Stacks the items vertically */
        text-align: center;
    }

    .footer-left, .footer-center, .footer-right {
        width: 100%; /* Ensures text takes up the full width of the phone */
        font-size: 0.85rem; /* Slightly smaller text for better fit */
        padding: 5px 0;
    }
}

@media (max-width: 768px) {
    .footer-center {
        font-size: 0.75rem; /* Makes text smaller */
        line-height: 1.4;
        display: block;
        width: 100%;
        word-wrap: break-word;
    }
    
    /* Optional: Replace the bullet points with line breaks on very small screens */
    .footer-center span::after {
        content: "\A";
        white-space: pre;
    }
}

.ad-leaderboard-desktop { display: block; text-align: center; margin: 20px auto; width: 100%; }
.ad-leaderboard-desktop ins { margin: 0 auto; display: inline-block !important; }
.ad-label { display: block; font-size: 10px; color: #ccc; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }

/* Desktop: Show the ad */
@media screen and (min-width: 769px) { .ad-leaderboard-desktop { display: block; } }

/* Mobile: Hide the fixed 728px ad to prevent layout breaking */
@media screen and (max-width: 768px) { .ad-leaderboard-desktop { display: none; } }
