/* CSS Variables */
:root {
    --primary-color: #007a5e;
    --secondary-color: #28a745;
    --accent-color: #17a2b8;
    --text-color: #000000;
    --text-light: #666666;
    --background-color: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    min-height: 48px;
}

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

.btn-primary:hover {
    background-color: #006b4e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-secondary:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

/* Header */
.header {
    background-color: var(--background-color);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.logo svg {
    pointer-events: none;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.logo-text .slogan {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.digital-clock {
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}

.emergency-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.emergency-label {
    color: var(--text-light);
}

.emergency-phone {
    font-weight: 600;
    color: #dc3545;
}

/* Running Text */
.running-text-container {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
}

.running-text {
    animation: scroll-left 30s linear infinite;
    white-space: nowrap;
}

.running-text.paused {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.running-control {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.running-control:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Action Buttons */
.action-buttons {
    background-color: var(--light-gray);
    padding: 1rem 0;
}

.action-buttons .container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

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

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.vision-mission {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.vision, .mission {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.vision h3, .mission h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mission ul {
    list-style: none;
    padding: 0;
}

.mission li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.mission li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

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

.service-card {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
}

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

.service-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Schedule Section */
.schedule-controls {
    margin-bottom: 2rem;
    text-align: center;
}

.day-filter {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.day-select {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--background-color);
}

.day-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.doctor-card {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-color);
}

.doctor-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.doctor-specialty {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.doctor-schedule {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--light-gray);
    border-radius: 4px;
}

.schedule-day {
    font-weight: 500;
}

.schedule-time {
    color: var(--text-light);
    font-size: 0.875rem;
}

.doctor-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.status-available {
    background-color: #d4edda;
    color: #155724;
}

.status-unavailable {
    background-color: #f8d7da;
    color: #721c24;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.article-preview {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition);
}

.read-more-btn:hover {
    color: var(--secondary-color);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.testimonial-avatar {
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.testimonial-author strong {
    color: var(--primary-color);
}

.testimonial-author span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 1.5rem;
}

/* Policies */
.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.policy-card {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.policy-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* BMI Calculator */
.bmi-calculator {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.bmi-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.bmi-form .btn {
    grid-column: 1 / -1;
    justify-self: center;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.bmi-result {
    text-align: center;
    padding: 2rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
}

.bmi-value {
    margin-bottom: 1rem;
}

.bmi-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.bmi-category {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.bmi-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Partners */
.partners-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.partners-button-container {
    text-align: center;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.partner-item {
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    text-align: center;
}

.partner-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.maps-container iframe {
    width: 100%;
    height: 250px;
    border: none;
    border-radius: var(--border-radius);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 3000;
}

.toast.show {
    transform: translateX(0);
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background-color: #f8d7da;
    border-radius: var(--border-radius);
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .digital-clock {
        display: none;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .action-buttons .container {
        flex-direction: column;
        align-items: center;
    }
    
    .vision-mission {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .policies-grid {
        grid-template-columns: 1fr;
    }
    
    .bmi-form {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.5rem 0;
    }
    
    .logo svg {
        width: 40px;
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 1.125rem;
    }
    
    .logo-text .slogan {
        font-size: 0.75rem;
    }
    
    .running-text {
        font-size: 0.875rem;
    }
    
    .service-card,
    .doctor-card,
    .article-card,
    .testimonial-card,
    .policy-card {
        padding: 1rem;
    }
    
    .bmi-calculator {
        padding: 1rem;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Print Styles */
@media print {
    .header,
    .action-buttons,
    .running-text-container,
    .modal,
    .toast {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #000000;
        --text-color: #000000;
        --background-color: #ffffff;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid var(--text-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .running-text {
        animation: none;
        transform: none;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background-color: var(--primary-color);
    color: white;
}
