/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Skip Links for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0066cc;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
}

/* Fix deprecated API warning: Explicit font-size for h1 in semantic sections */
section h1,
article h1,
aside h1,
nav h1 {
    font-size: 2.5rem !important;
}

/* More specific targeting for all possible h1 in semantic sections */
section > h1,
article > h1,
aside > h1,
nav > h1,
section .container h1,
section .hero-content h1,
.section h1,
.page-header h1 {
    font-size: 2.5rem !important;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #004499;
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 1rem 0;
}

.what-we-do {
    padding-bottom: 0.25rem;
}

.support-section {
    padding-top: 0.25rem;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

/* Header and Navigation */
.site-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-logo img {
    height: 60px;
    width: auto;
    max-width: 280px;
}

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

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #0066cc;
    color: white;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/healthcare-bg.svg'), linear-gradient(135deg, rgba(0,102,204,0.75), rgba(0,68,153,0.75));
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem !important; /* Explicit font-size to prevent deprecated API warning */
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
    color: #f8f9fa;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Ensure hero h1 specifically overrides browser defaults */
.hero h1,
section.hero h1 {
    font-size: 3rem !important;
}

/* Ultimate fallback to catch any h1 in semantic sections that Lighthouse might find */
main section h1,
main article h1,
main aside h1,
main nav h1 {
    font-size: 2.5rem !important;
}

/* Explicit targeting for Lighthouse compatibility - covers all possible h1 contexts */
body section h1,
body article h1,
body aside h1,
body nav h1,
html section h1,
html article h1,
html aside h1,
html nav h1 {
    font-size: 2.5rem !important;
}

/* Force browser to recognize explicit font-size on ALL h1 elements */
h1[class*="hero"],
h1[class*="title"],
section h1[class],
section h1:not([class]) {
    font-size: 2.5rem !important;
}

/* Target the specific hero h1 that Lighthouse is detecting */
.hero .hero-title,
section.hero .hero-title,
section.hero h1.hero-title {
    font-size: 3rem !important;
    -webkit-font-size: 3rem !important;
    -moz-font-size: 3rem !important;
}

/* Modern CSS approach for Lighthouse - explicit font-size for context */
@supports (font-size: 1rem) {
    section:is(section, article, aside, nav) h1 {
        font-size: 2.5rem !important;
    }
    
    section.hero h1 {
        font-size: 3rem !important;
    }
}

/* CSS Reset approach - ensure no browser defaults interfere */
* {
    --h1-font-size: 2.5rem;
}

section h1, article h1, aside h1, nav h1 {
    font-size: var(--h1-font-size) !important;
}

section.hero h1 {
    --h1-font-size: 3rem;
}

/* GDPR Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 1rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 3px solid #0066cc;
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-banner-text {
    flex: 1;
    min-width: 250px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-banner-text p {
    margin: 0 0 0.5rem 0;
}

.cookie-banner-text a {
    color: #4da6ff;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #66b3ff;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
}

.cookie-btn-accept {
    background: #0066cc;
    color: white;
}

.cookie-btn-accept:hover {
    background: #0052a3;
}

.cookie-btn-reject {
    background: transparent;
    color: white;
    border: 1px solid #666;
}

.cookie-btn-reject:hover {
    background: #333;
    border-color: #999;
}

.cookie-btn-settings {
    background: transparent;
    color: #4da6ff;
    border: 1px solid #4da6ff;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
}

.cookie-btn-settings:hover {
    background: #4da6ff;
    color: white;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cookie-modal h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    color: #333;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 6px;
}

.cookie-category h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-category p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #0066cc;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

/* Nuclear option: Completely override any browser defaults for semantic sections */
section h1,
section h2,
section h3,
section h4,
section h5,
section h6 {
    font-size: revert-layer !important;
}

section h1 {
    font-size: 2.5rem !important;
}

section.hero h1 {
    font-size: 3rem !important;
}

/* Modern CSS approach to explicitly override context-sensitive sizing */
h1:where(section *, article *, aside *, nav *) {
    font-size: 2.5rem !important;
}

.hero h1:where(section *) {
    font-size: 3rem !important;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
    color: #f8f9fa;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    color: #0066cc;
    margin-bottom: 0.5rem;
    font-size: 2.5rem !important;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    list-style: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb li::after {
    content: " / ";
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: #6c757d;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.content-main {
    max-width: none;
    margin-bottom: none;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 0.5rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    color: #0066cc;
    margin-bottom: 1rem;
}

/* How We Help Section */
.how-we-help {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.services-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: 1;
}

.services-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-title {
    text-align: center;
    color: #0066cc;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #6c757d;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.help-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: #0066cc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.help-item:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-3px);
}

/* Contact Styles */
.contact-content {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.contact-info-centered {
    max-width: 600px;
    text-align: center;
}

.contact-info-centered h2 {
    color: #0066cc;
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.contact-item {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
    color: #0066cc;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-cta {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.contact-highlight {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    margin: 2rem 0;
}

.contact-highlight h3 {
    color: #0066cc;
    margin-bottom: 1rem;
}

.contact-highlight address {
    font-style: normal;
    line-height: 1.6;
}

/* Forms - removed as contact form is no longer needed */

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
}

.btn-primary {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #004499;
    border-color: #004499;
    color: white;
    text-decoration: none;
}

/* Legal Content */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content h2 {
    color: #0066cc;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.disclaimer-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #0066cc;
}

.benefits-list {
    list-style-type: disc;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.benefits-list li {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #0066cc;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ecf0f1;
}

.footer-section a:hover {
    color: #0066cc;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        gap: 1rem;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2rem !important;
    }
    
    /* Ensure all h1 in sections get explicit sizing on tablet */
    section h1, article h1, aside h1, nav h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .help-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .contact-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .contact-cta {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section {
        padding: 2rem 0;
    }

    .container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    /* Ensure h1 in sections still gets explicit sizing on mobile */
    section h1 {
        font-size: 1.75rem !important;
    }

    .service-card,
    .help-item {
        padding: 1rem;
    }

    .contact-highlight {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .nav-toggle,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .section {
        padding: 1rem 0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero {
        background: #000000;
    }
    
    .service-card {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
