/**
 * Hospital Management System - Professional Theme CSS
 * 
 * Modern, professional styling for hospital websites
 * with comprehensive customization support.
 */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - These will be overridden by customizer */
    --hms-primary-color: #0073aa;
    --hms-secondary-color: #28a745;
    --hms-text-color: #333333;
    --hms-background-color: #ffffff;
    --hms-header-bg-color: #ffffff;
    --hms-footer-bg-color: #2c3e50;
    --hms-primary-font: 'Inter', sans-serif;
    --hms-secondary-font: 'Poppins', sans-serif;
    --hms-base-font-size: 16px;
    --hms-line-height: 1.6;
    --hms-container-width: 1200px;
    --hms-section-padding: 80px;
    --hms-border-radius: 8px;
    --hms-hero-overlay: rgba(0, 115, 170, 0.8);
    
    /* Additional colors */
    --hms-light-gray: #f8f9fa;
    --hms-medium-gray: #6c757d;
    --hms-dark-gray: #495057;
    --hms-success: #28a745;
    --hms-warning: #ffc107;
    --hms-danger: #dc3545;
    --hms-info: #17a2b8;
    
    /* Shadows */
    --hms-shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --hms-shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
    --hms-shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --hms-transition-fast: 0.2s ease;
    --hms-transition-normal: 0.3s ease;
    --hms-transition-slow: 0.5s ease;
}

/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--hms-primary-font);
    font-size: var(--hms-base-font-size);
    line-height: var(--hms-line-height);
    color: var(--hms-text-color);
    background-color: var(--hms-background-color);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--hms-secondary-font);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--hms-text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--hms-text-color);
}

a {
    color: var(--hms-primary-color);
    text-decoration: none;
    transition: color var(--hms-transition-normal);
}

a:hover {
    color: var(--hms-primary-color);
    text-decoration: none;
}

/* ===== LAYOUT ===== */
.container {
    max-width: var(--hms-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.section {
    padding: var(--hms-section-padding) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--hms-text-color);
}

.section-title p {
    font-size: 1.1rem;
    color: var(--hms-medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

.text-left {
    text-align: left;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--hms-header-bg-color);
    box-shadow: var(--hms-shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Header Bar */
.header-top {
    background: var(--hms-primary-color);
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-contact a {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color var(--hms-transition-normal);
}

.header-contact a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.emergency-contact {
    background: var(--hms-secondary-color);
    padding: 5px 10px;
    border-radius: var(--hms-border-radius);
    font-weight: 600;
}

.header-social {
    display: flex;
    gap: 15px;
}

.header-social a {
    color: #fff;
    font-size: 16px;
    transition: color var(--hms-transition-normal);
}

.header-social a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Main Header */
.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo img {
    height: 60px;
    width: auto;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hms-text-color);
    margin: 0;
}

.site-title a {
    color: var(--hms-text-color);
}

.site-description {
    color: var(--hms-medium-gray);
    font-size: 14px;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Navigation */
.main-navigation {
    background: var(--hms-primary-color);
}

.main-navigation .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: 500;
    transition: background-color var(--hms-transition-normal);
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: var(--hms-shadow-medium);
    min-width: 200px;
    z-index: 1000;
    border-radius: var(--hms-border-radius);
}

.nav-menu li:hover .sub-menu {
    display: block;
}

.nav-menu .sub-menu a {
    color: var(--hms-text-color);
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}

.nav-menu .sub-menu a:hover {
    background: var(--hms-light-gray);
    color: var(--hms-primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 120px 0;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hms-hero-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--hms-border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--hms-transition-normal);
    text-align: center;
    justify-content: center;
    text-transform: none;
}

.btn-primary {
    background: var(--hms-primary-color);
    color: #fff;
    border: 2px solid var(--hms-primary-color);
}

.btn-primary:hover {
    background: var(--hms-primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--hms-shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: var(--hms-primary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* ===== SERVICES SECTION ===== */
.services-section {
    background: var(--hms-light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--hms-border-radius);
    text-align: center;
    box-shadow: var(--hms-shadow-light);
    transition: transform var(--hms-transition-normal), box-shadow var(--hms-transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hms-shadow-medium);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 115, 170, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--hms-primary-color);
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--hms-text-color);
}

.service-description {
    color: var(--hms-medium-gray);
    line-height: 1.6;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--hms-medium-gray);
}

.hospital-address {
    margin-bottom: 30px;
}

.hospital-address h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hms-primary-color);
    margin-bottom: 10px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--hms-light-gray);
    border-radius: var(--hms-border-radius);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hms-primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--hms-medium-gray);
    font-size: 14px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--hms-border-radius);
    box-shadow: var(--hms-shadow-medium);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--hms-footer-bg-color);
    color: #fff;
}

.footer-content {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h3,
.footer-column h4 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--hms-transition-normal);
}

.footer-links a:hover {
    color: #fff;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    color: var(--hms-primary-color);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all var(--hms-transition-normal);
}

.social-links a:hover {
    background: var(--hms-primary-color);
    transform: translateY(-2px);
}

.newsletter-signup h5 {
    color: #fff;
    margin-bottom: 10px;
}

.newsletter-signup p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    font-size: 14px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: var(--hms-border-radius);
    font-size: 14px;
}

.newsletter-form button {
    padding: 10px 15px;
    font-size: 14px;
}

.emergency-contact-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hms-secondary-color);
    padding: 15px;
    border-radius: var(--hms-border-radius);
    margin-top: 20px;
}

.emergency-contact-footer i {
    font-size: 24px;
}

.emergency-contact-footer span {
    font-size: 12px;
    opacity: 0.8;
}

.emergency-contact-footer strong {
    font-size: 16px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    transition: color var(--hms-transition-normal);
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.shadow-hover {
    transition: box-shadow var(--hms-transition-normal);
}

.shadow-hover:hover {
    box-shadow: var(--hms-shadow-heavy);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-main .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--hms-primary-color);
        flex-direction: column;
        box-shadow: var(--hms-shadow-medium);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu .sub-menu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }
    
    .hero-section {
        padding: 80px 0;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 16px;
    }
}

/* ===== ACCESSIBILITY ===== */
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--hms-primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .service-card {
        border: 1px solid var(--hms-text-color);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .site-footer,
    .hero-section,
    .btn {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .service-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        display: none;
    }
}
