/* ==========================================================
   M.R SOLAR SYSTEMS - PREMIUM STYLESHEET
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER & BRANDING ===== */

.header {
    background: #0b1c2d;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease;
}

.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mr-logo {
    width: 110px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(145deg, #ff9800, #0b1c2d);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.45), 0 6px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.mr-logo:hover {
    transform: scale(1.06);
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.75), 0 10px 24px rgba(0, 0, 0, 0.6);
}

.brand-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin: 0;
}

.highlight-solar {
    color: #ff9800;
}

.dealer-text {
    font-size: 13px;
    margin-top: 4px;
    color: #cbd5e1;
    font-weight: 500;
}

.tata-highlight {
    color: #ff9800;
    font-weight: 700;
}

/* ===== NAVIGATION ===== */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 6px 4px;
}

.nav-menu a:hover {
    color: #ff9800;
    transform: translateY(-1px);
}

.login-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border: none;
    padding: 8px 22px;
    border-radius: 30px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.4);
    display: inline-block;
    text-decoration: none;
}

.login-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

.login-btn:active {
    transform: translateY(0);
}

/* ===== HERO SECTION ===== */

.hero {
    background: linear-gradient(rgba(11, 28, 45, 0.75), rgba(11, 28, 45, 0.85)),
        url('https://images.unsplash.com/photo-1508514177221-188b1cf16e9d?auto=format&fit=crop&w=1920&q=80')
        no-repeat center center/cover;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 60px 20px;
}

.hero-content {
    max-width: 900px;
}

.hero h2 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 18px;
    animation: fadeUp 1s ease forwards;
}

.hero p {
    font-size: 17px;
    margin-bottom: 28px;
    color: #cbd5e1;
    line-height: 1.7;
    animation: fadeUp 1.2s ease forwards;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    padding: 14px 34px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    display: inline-block;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.55);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===== SECTIONS ===== */

section {
    padding: 70px 8%;
}

.dark-section {
    background: #0b1c2d;
    color: #ffffff;
}

.dark-section p {
    color: #cbd5e1;
}

.light-section {
    background: #ffffff;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.dark-section .section-title {
    color: #ffffff;
}

.light-section .section-title {
    color: #0b1c2d;
}

/* ===== CARDS ===== */

.product-card, .card {
    background: #ffffff;
    color: #1e293b;
    padding: 28px;
    margin-bottom: 24px;
    border-radius: 12px;
    border-left: 5px solid #ff9800;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card h3, .card h3 {
    color: #0b1c2d;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-card p, .card p {
    color: #475569;
    line-height: 1.7;
}

.product-card ul {
    margin-top: 14px;
    padding-left: 20px;
    color: #475569;
    line-height: 1.8;
}

.product-card:hover, .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.gallery-trigger {
    cursor: pointer;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.gallery-trigger:hover {
    border-color: #ff9800;
}

/* ===== STATS ===== */

.stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.stat-box {
    margin: 15px 20px;
    flex: 1;
    min-width: 180px;
}

.stat-box h2 {
    font-size: 46px;
    font-weight: 800;
    color: #ff9800;
    margin-bottom: 6px;
}

.stat-box p {
    font-size: 15px;
    font-weight: 600;
    color: #cbd5e1;
}

.service-warranty {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-top: 6px;
}

/* ===== EMI & FORM BOX ===== */

.emi-box {
    background: #ffffff;
    padding: 35px;
    border-radius: 14px;
    margin-bottom: 30px;
    border: 2px solid #ff9800;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.emi-box input,
.emi-box select {
    width: 100%;
    padding: 13px 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.emi-box input:focus,
.emi-box select:focus {
    border-color: #ff9800;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.18);
    outline: none;
}

.emi-box button {
    width: 100%;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #ffffff;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.35);
}

.emi-box button:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.emi-box button:active {
    transform: translateY(0);
}

/* ===== LEAD POPUP & OVERLAY ===== */

.lead-popup-overlay,
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 28, 45, 0.82);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 15px;
}

.lead-popup-box {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 32px 28px;
    border-radius: 14px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    animation: popupFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100000;
}

.lead-close-btn,
.gallery-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.lead-close-btn:hover,
.gallery-close:hover {
    color: #ff5252;
    transform: scale(1.15);
}

.lead-popup-box h2 {
    color: #0b1c2d;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.lead-popup-box p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.lead-popup-box input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lead-popup-box input:focus {
    border-color: #ff9800;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.18);
    outline: none;
}

.lead-popup-box button {
    width: 100%;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #ffffff;
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.35);
    margin-top: 4px;
}

.lead-popup-box button:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

/* ===== FORM VALIDATION & FEEDBACK ===== */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.emi-box input.field-invalid,
.lead-popup-box input.field-invalid {
    border: 2px solid #e74c3c !important;
    background: #fff5f5 !important;
    animation: shake 0.35s ease-in-out;
}

.leadFormMsg {
    display: none;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    text-align: center;
    animation: leadMsgIn 0.3s ease;
}

.leadFormMsg.show {
    display: block;
}

.leadFormMsg.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: #1a7f4a;
}

.leadFormMsg.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #c0392b;
}

.emi-box button:disabled,
.lead-popup-box button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.leadSpinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: leadSpin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes leadSpin {
    to { transform: rotate(360deg); }
}

@keyframes leadMsgIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes popupFade {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */

footer {
    background: #0b1c2d;
    color: #cbd5e1;
    padding: 50px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

footer p {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 6px;
}

/* ===== RESPONSIVENESS ===== */

@media (max-width: 992px) {
    .hero h2 { font-size: 32px; }
    section { padding: 55px 6%; }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 16px 20px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }

    .hero {
        min-height: 65vh;
        padding: 40px 16px;
    }

    .hero h2 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    section {
        padding: 45px 5%;
    }

    .section-title {
        font-size: 24px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .emi-box {
        padding: 24px 18px;
    }

    .lead-popup-box {
        padding: 24px 18px;
    }
}
