@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #006b5f;
    --primary-dark: #004d44;
    --primary-light: #e6f0ef;
    --secondary-color: #0d99ff;
    --secondary-dark: #0077cc;
    --accent-color: #f6c343;
    --dark-color: #0f172a;
    --dark-muted: #1e293b;
    --light-bg: #f8fafc;
    --text-muted: #64748b;
    --text-main: #334155;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark-color);
    font-weight: 700;
}

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-light-primary { background-color: var(--primary-light) !important; }

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(0, 107, 95, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 107, 95, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(13, 153, 255, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 153, 255, 0.4);
}

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

/* Topbar */
.topbar {
    background: var(--dark-color);
    color: #cbd5e1;
    font-size: 0.875rem;
    padding: 8px 0;
}

.topbar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.topbar i {
    color: var(--secondary-color);
}

/* Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand .brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
}

.navbar-brand .brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--dark-color);
    padding: 8px 10px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 2px;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(0, 107, 95, 0.85) 100%), url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?q=80&w=2053&auto=format&fit=crop') center/cover no-repeat;
    color: var(--white);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23ffffff" fill-opacity="0.05" fill-rule="evenodd"%3E%3Ccircle cx="3" cy="3" r="3"/%3E%3Ccircle cx="13" cy="13" r="3"/%3E%3C/g%3E%3C/svg%3E');
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title span {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
}

/* Quick Action Cards */
.quick-action-wrapper {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.quick-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

.quick-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

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

.quick-card:hover::after {
    transform: scaleX(1);
}

.quick-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.quick-card:hover .quick-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(5deg) scale(1.1);
}

.quick-card h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.quick-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Service Cards */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.service-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.03);
}

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

.service-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img-wrapper img {
    transform: scale(1.1);
}

.service-icon-floating {
    position: absolute;
    bottom: -25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(13, 153, 255, 0.4);
    z-index: 2;
}

.service-body {
    padding: 40px 25px 25px;
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.service-card .btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.service-card .btn-link:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* Schedule Table */
.schedule-wrapper {
    background: var(--white);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.table-custom th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table-custom th:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.table-custom th:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

.table-custom td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-custom tbody tr:hover {
    background-color: var(--light-bg);
}

.doctor-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doctor-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

/* News Section */
.news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

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

.news-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.news-date {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-body {
    padding: 25px;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: #94a3b8;
    padding: 80px 0 30px;
    position: relative;
}

.footer-title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a::before {
    content: '\F285';
    font-family: 'bootstrap-icons';
    margin-right: 8px;
    font-size: 0.8rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .quick-action-wrapper {
        margin-top: 30px;
    }
    .quick-card {
        margin-bottom: 20px;
    }
    .navbar {
        background: var(--white);
    }
}

/* ==========================================================================
   Floating Accessibility Panel Styles (WCAG 2.1 Compliance)
   ========================================================================== */

#accessibility-widget-btn:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 10px 25px rgba(0, 107, 95, 0.4) !important;
}

#accessibility-panel.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Font Resizing Buttons Active States */
#accessibility-panel .btn-outline-dark:hover,
#accessibility-panel .btn-outline-dark.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

#accessibility-panel #wcag-reset:hover {
    background-color: #f44336 !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.2);
}

/* ==========================================================================
   Accessibility Feature Overrides
   ========================================================================== */

/* 1. Dyslexia Font Override */
body.dyslexia-font,
body.dyslexia-font *,
body.dyslexia-font p,
body.dyslexia-font span,
body.dyslexia-font a,
body.dyslexia-font h1,
body.dyslexia-font h2,
body.dyslexia-font h3,
body.dyslexia-font h4,
body.dyslexia-font h5,
body.dyslexia-font h6,
body.dyslexia-font li,
body.dyslexia-font td,
body.dyslexia-font th {
    font-family: 'Comic Sans MS', system-ui, -apple-system, sans-serif !important;
    line-height: 1.8 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

/* 2. High Contrast Mode Override (WCAG 2.1 Yellow/Black Standard) */
body.wcag-high-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.wcag-high-contrast,
body.wcag-high-contrast div,
body.wcag-high-contrast section,
body.wcag-high-contrast header,
body.wcag-high-contrast footer,
body.wcag-high-contrast nav,
body.wcag-high-contrast .navbar,
body.wcag-high-contrast .card,
body.wcag-high-contrast .modal-content,
body.wcag-high-contrast .topbar,
body.wcag-high-contrast table,
body.wcag-high-contrast td,
body.wcag-high-contrast th,
body.wcag-high-contrast tbody,
body.wcag-high-contrast tr,
body.wcag-high-contrast ul,
body.wcag-high-contrast li {
    background-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Yellow Contrast for Titles, Headers and Prominent Text */
body.wcag-high-contrast h1,
body.wcag-high-contrast h2,
body.wcag-high-contrast h3,
body.wcag-high-contrast h4,
body.wcag-high-contrast h5,
body.wcag-high-contrast h6,
body.wcag-high-contrast strong,
body.wcag-high-contrast b,
body.wcag-high-contrast .section-title,
body.wcag-high-contrast .brand-title,
body.wcag-high-contrast .nav-link.active,
body.wcag-high-contrast .nav-link:hover,
body.wcag-high-contrast th,
body.wcag-high-contrast .badge,
body.wcag-high-contrast .text-primary,
body.wcag-high-contrast .text-secondary,
body.wcag-high-contrast i {
    color: #ffff00 !important;
}

/* Accessibility Control Panel exception inside Contrast Mode */
body.wcag-high-contrast #accessibility-panel,
body.wcag-high-contrast #accessibility-panel div,
body.wcag-high-contrast #accessibility-panel p,
body.wcag-high-contrast #accessibility-panel label {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffff00 !important;
}

body.wcag-high-contrast #accessibility-panel .card-header {
    background-color: #000000 !important;
    border-bottom: 2px solid #ffff00 !important;
}

body.wcag-high-contrast #accessibility-panel button {
    border: 2px solid #ffff00 !important;
    color: #ffff00 !important;
    background: #000000 !important;
}

body.wcag-high-contrast #accessibility-panel button:hover,
body.wcag-high-contrast #accessibility-panel button.active {
    background: #ffff00 !important;
    color: #000000 !important;
}

/* Links & Buttons in High Contrast */
body.wcag-high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.wcag-high-contrast a:hover {
    color: #ffffff !important;
}

body.wcag-high-contrast button,
body.wcag-high-contrast .btn,
body.wcag-high-contrast .btn-primary,
body.wcag-high-contrast .btn-secondary,
body.wcag-high-contrast .btn-outline-primary {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}

body.wcag-high-contrast button:hover,
body.wcag-high-contrast .btn:hover {
    background: #ffff00 !important;
    color: #000000 !important;
}

/* Elements that should be hidden or simplified in contrast mode */
body.wcag-high-contrast img {
    filter: grayscale(1) contrast(1.5) !important;
    border: 1px solid #ffffff !important;
}

body.wcag-high-contrast .hero-section::before,
body.wcag-high-contrast .quick-card::after {
    display: none !important;
}

body.wcag-high-contrast .quick-icon,
body.wcag-high-contrast .service-icon-floating {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 1px solid #ffff00 !important;
}

/* 3. Text-To-Speech Highlight Mode */
.wcag-tts-ready {
    transition: outline 0.15s ease, outline-offset 0.15s ease;
}

.wcag-tts-ready:hover {
    cursor: help !important;
}

.wcag-tts-highlight {
    outline: 3px dashed #ff9f00 !important;
    outline-offset: 4px !important;
    border-radius: 4px !important;
    background-color: rgba(255, 159, 0, 0.08) !important;
}

body.wcag-high-contrast .wcag-tts-highlight {
    outline: 3px dashed #ffff00 !important;
    background-color: rgba(255, 255, 0, 0.2) !important;
}

/* ==========================================================================
   Instagram Widget Feed Styles
   ========================================================================== */
.instagram-post-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
}

.instagram-post-wrapper img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.instagram-post-wrapper:hover img {
    transform: scale(1.08);
}

.instagram-post-wrapper .instagram-overlay {
    transition: all 0.35s ease;
}

.instagram-post-wrapper:hover .instagram-overlay {
    opacity: 1 !important;
}

.btn-instagram-custom {
    background: linear-gradient(45deg, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(214, 36, 159, 0.35);
    transition: all 0.3s ease;
}

.btn-instagram-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 36, 159, 0.45);
    filter: brightness(1.05);
}

/* High Contrast compatibility */
body.wcag-high-contrast .btn-instagram-custom {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
    box-shadow: none !important;
}

body.wcag-high-contrast .btn-instagram-custom:hover {
    background: #ffff00 !important;
    color: #000000 !important;
}

