:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --danger: #dc2626;
    --success: #16a34a;
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: #fff;
    padding-bottom: 60px; /* Space for mobile CTA bar */
}

/* Accessibility Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--secondary);
    line-height: 1.25;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-dark);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--secondary);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff !important;
}

/* Emergency & Advisory Bars */
.emergency-bar {
    background-color: var(--danger);
    color: #fff;
    text-align: center;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.emergency-bar a {
    color: #fff;
    text-decoration: underline;
}

.advisory-box {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.advisory-tag {
    background: var(--danger);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Trust Bar */
.trust-bar {
    background: var(--secondary);
    color: #fff;
    padding: 1.5rem 5%;
}

.trust-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.trust-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--accent);
}

.trust-item span {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Interactive Quiz Widget */
.quiz-widget {
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 750px;
    margin: 3rem auto;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.1);
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quiz-opt-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.quiz-opt-btn:hover {
    border-color: var(--primary);
    background: #f0f9ff;
    color: var(--primary-dark);
}

/* Accordion FAQ */
.accordion {
    max-width: 850px;
    margin: 0 auto;
}

.accordion-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #fff;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
}

.accordion-item.active .accordion-header::after {
    content: '−';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
    color: var(--text-main);
}

.accordion-item.active .accordion-content {
    max-height: 600px;
    padding: 0 1.5rem 1.5rem;
}

/* Sticky Mobile Bottom Bar */
.sticky-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--secondary);
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    z-index: 2000;
}

.sticky-mobile-bar a {
    flex: 1;
    text-align: center;
    margin: 0 0.25rem;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
}

@media (min-width: 769px) {
    .sticky-mobile-bar {
        display: none;
    }
    body {
        padding-bottom: 0;
    }
}

/* Hero */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('../images/hero.jpg') center/cover;
    color: #fff;
    padding: 5rem 5%;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    max-width: 850px;
    margin: 0 auto 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 2rem;
    color: #e2e8f0;
}

/* Sections */
.section {
    padding: 4.5rem 5%;
}

.section-bg {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Forms */
.form-container {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
    min-width: 0; /* Prevents grid item overflow */
    width: 100%;
    box-sizing: border-box;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.form-group select option {
    white-space: normal;
    color: var(--text-main);
}

.form-group input[type="date"] {
    min-height: 46px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.file-upload-box {
    border: 2px dashed var(--border);
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: 8px;
    background: var(--bg-light);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.file-upload-box:hover {
    border-color: var(--primary);
    background-color: #f0f9ff;
}

#file-label {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-alert {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
}

.form-alert.success {
    background-color: #dcfce7;
    color: var(--success);
    border: 1px solid #bbf7d0;
    display: block;
}

.form-alert.error {
    background-color: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
    display: block;
}

.honeypot {
    display: none !important;
}

@media (max-width: 768px) {
    .form-container {
        padding: 1.75rem 1.25rem;
        border-radius: 10px;
    }
    .form-grid, .quiz-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .advisory-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2.5rem 4%;
    }
    .form-container {
        padding: 1.25rem 0.85rem;
        box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents auto-zoom on mobile WebKit */
        padding: 0.75rem 0.85rem;
    }
}

/* Footer */
footer {
    background-color: var(--secondary);
    color: #fff;
    text-align: center;
    padding: 3rem 5%;
    margin-top: 4rem;
}

/* Print Stylesheet */
@media print {
    .navbar, .emergency-bar, .sticky-mobile-bar, footer, .btn {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }
    .section {
        padding: 1rem 0;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background: #ffffff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 1rem 0;
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a, .nav-links .btn {
        margin: 0.5rem 2rem;
        text-align: center;
    }
}

/* Floating Call & WhatsApp Widget */
.floating-contact-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.floating-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    line-height: 1;
}

.floating-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.floating-whatsapp {
    background: #25D366;
    background: linear-gradient(135deg, #2ee06e 0%, #20ba5a 100%);
}

.floating-whatsapp:hover {
    background: #1eb853;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.38);
}

.floating-whatsapp:hover svg {
    transform: scale(1.1);
}

.floating-phone {
    background: var(--primary);
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.floating-phone:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.4);
}

.floating-phone:hover svg {
    transform: scale(1.1) rotate(10deg);
}

@media (max-width: 600px) {
    .floating-contact-widget {
        bottom: 18px;
        right: 16px;
        gap: 10px;
    }
    
    .floating-btn {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
    
    .floating-btn svg {
        width: 22px;
        height: 22px;
    }
}

@media print {
    .floating-contact-widget {
        display: none !important;
    }
}
