/* ============================================
   HealthSureAU - Health Insurance Comparison
   Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-navy: #003366;
    --primary-navy-dark: #002244;
    --secondary-green: #00A86B;
    --accent-orange: #FF8C00;
    --accent-orange-hover: #FF9B21;
    --background-light: #F8FAFC;
    --background-white: #FFFFFF;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-navy);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

h3:first-of-type {
    margin-top: 0;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-medium);
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--accent-orange);
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-green);
    color: white;
}

.btn-secondary:hover {
    background-color: #009660;
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-navy);
    border: 2px solid var(--primary-navy);
}

.btn-outline:hover {
    background-color: var(--primary-navy);
    color: white;
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-medium);
}

.btn-ghost:hover {
    background-color: var(--background-light);
    color: var(--text-dark);
}

/* ============================================
   COOKIE CONSENT BANNER (GDPR)
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 20px;
    border-top: 3px solid var(--primary-navy);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-text h3 {
    color: var(--primary-navy);
    font-size: 1.125rem;
    margin-bottom: 8px;
    margin-top: 0;
}

.cookie-consent-text p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin-bottom: 0;
    line-height: 1.6;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   SWITCH TOGGLE FOR COOKIE PREFERENCES
   ============================================ */

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition);
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: var(--secondary-green);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    position: relative;
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-container.cookie-settings-modal {
    max-width: 550px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--primary-navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--background-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   COOKIE SETTINGS MODAL STYLES
   ============================================ */

.cookie-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.cookie-category-info h4 {
    color: var(--primary-navy);
    margin-bottom: 4px;
    margin-top: 0;
}

.cookie-category-info p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ============================================
   LEGAL CONTENT STYLES (Modals)
   ============================================ */

.legal-content {
    font-size: 0.9375rem;
    line-height: 1.8;
}

.legal-content h3 {
    color: var(--primary-navy);
    font-size: 1.125rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 16px;
    margin-top: 24px;
}

.legal-content h3:first-of-type {
    margin-top: 0;
}

.legal-content h4 {
    color: var(--text-dark);
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-content h4:first-of-type {
    margin-top: 0;
}

.legal-content p {
    color: var(--text-medium);
    margin-bottom: 16px;
}

.legal-content p.last-updated {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 24px;
}

.legal-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-content ul li {
    margin-bottom: 8px;
    color: var(--text-medium);
}

.legal-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

.company-details {
    background-color: var(--background-light);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.company-details p {
    margin-bottom: 4px;
}

.company-details p:last-child {
    margin-bottom: 0;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.875rem;
}

.cookie-table th,
.cookie-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.cookie-table th {
    background-color: var(--background-light);
    font-weight: 600;
    color: var(--primary-navy);
}

.cookie-table td {
    color: var(--text-medium);
}

/* ============================================
   TOP BAR
   ============================================ */

.top-bar {
    background-color: var(--primary-navy);
    color: white;
    padding: 8px 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.trust-badge svg {
    flex-shrink: 0;
}

.last-updated {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background-color: var(--background-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
}

.logo-accent {
    color: var(--secondary-green);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-orange);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-navy);
}

.nav-link:hover::after {
    width: 100%;
}

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

.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

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

.hero h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* ============================================
   COMPARISON SECTION
   ============================================ */

.comparison-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header p {
    color: var(--text-medium);
    font-size: 1.125rem;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.provider-card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.provider-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.provider-card.top-choice {
    border: 2px solid var(--primary-navy);
}

.rank-badge {
    position: absolute;
    top: -12px;
    left: 28px;
    background-color: var(--accent-orange);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.provider-logo {
    width: 160px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.provider-rating {
    text-align: right;
}

.stars {
    color: #FFC107;
    font-size: 1.25rem;
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.star {
    color: var(--border-color);
}

.star.filled {
    color: #FFC107;
}

.star.half {
    background: linear-gradient(90deg, #FFC107 50%, var(--border-color) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
}

.provider-features h4 {
    color: var(--primary-navy);
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-medium);
}

.check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.provider-pricing {
    margin-bottom: 20px;
}

.price-tag {
    font-size: 1.125rem;
    color: var(--text-medium);
}

.price-tag strong {
    font-size: 1.5rem;
    color: var(--primary-navy);
    font-weight: 700;
}

.provider-note {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 12px;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--primary-navy);
}

/* ============================================
   GUIDES SECTION
   ============================================ */

.guides-section {
    background-color: var(--background-white);
    padding: 60px 0;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.guide-card {
    background-color: var(--background-light);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-navy);
}

.guide-icon {
    width: 64px;
    height: 64px;
    background-color: var(--background-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.guide-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.read-more {
    font-weight: 600;
    color: var(--accent-orange);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.read-more:hover {
    gap: 10px;
}

.lhi-callout {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid #A5D6A7;
}

.lhi-callout h3 {
    color: #2E7D32;
    margin-bottom: 12px;
}

.lhi-callout p {
    max-width: 800px;
    margin: 0 auto;
    color: #1B5E20;
}

/* ============================================
   DISCLAIMER SECTION
   ============================================ */

.disclaimer-section {
    padding: 40px 0;
    background-color: var(--background-light);
}

.disclaimer-box {
    background-color: var(--background-white);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--border-color);
}

.disclaimer-box h4 {
    color: var(--primary-navy);
    margin-bottom: 12px;
}

.disclaimer-box p {
    font-size: 0.875rem;
    line-height: 1.8;
    margin-bottom: 0;
}

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

.footer {
    background-color: var(--primary-navy-dark);
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 48px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: white;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 0;
    font-size: 0.9375rem;
    cursor: pointer;
}

.footer-links a:hover {
    color: var(--accent-orange);
}

.contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.contact-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
}

.phone-link {
    color: var(--accent-orange);
}

.phone-link:hover {
    color: var(--accent-orange-hover);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.affiliate-disclosure {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-text {
        min-width: 100%;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .nav {
        gap: 20px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-benefits {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .provider-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .provider-rating {
        text-align: left;
    }

    .cta-button {
        padding: 16px 24px;
    }

    .trust-indicators {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links,
    .footer-contact {
        text-align: center;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal {
        padding: 10px;
        align-items: flex-end;
    }

    .modal-container {
        max-height: 90vh;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-consent-buttons .btn {
        width: 100%;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .switch {
        margin-top: 12px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .provider-card {
        padding: 20px;
    }

    .rank-badge {
        left: 20px;
        font-size: 0.6875rem;
        padding: 4px 12px;
    }

    .provider-logo {
        width: 120px;
        height: 48px;
        font-size: 14px;
    }

    .stars {
        font-size: 1rem;
    }

    .price-tag strong {
        font-size: 1.25rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .top-bar,
    .header,
    .cta-button,
    .footer-bottom,
    .cookie-consent-banner,
    .modal {
        display: none !important;
    }

    .provider-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-navy: #000033;
        --text-medium: #333;
        --border-color: #000;
    }
}

/* ============================================
   BODY SCROLL LOCK (When Modal Open)
   ============================================ */

body.modal-open {
    overflow: hidden;
}
