/* ========================================
   Hospital Management System - Main Styles
   ======================================== */

/* Custom Properties */
:root {
    --primary: #0a1628;
    --secondary: #1e3a5f;
    --accent: #00bcd4;
    --hospital: #0d47a1;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --cyan-600: #0891b2;
}

/* ========================================
   Mobile Info Header Responsive Styles
   ======================================== */

/* Extra small screens (below 480px) */
@media (max-width: 479px) {
    #topInfoBar {
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }
    
    #topInfoBar h1 {
        font-size: 0.9rem !important;
    }
    
    #topInfoBar .flex.items-center.gap-2 a[href^="tel"] {
        font-size: 0.7rem;
    }
}

/* Custom xs breakpoint for Tailwind compatibility */
@media (min-width: 480px) {
    .xs\:inline {
        display: inline !important;
    }
}

/* Info Bar Animations */
#topInfoBar {
    transition: all 0.3s ease;
}

/* Mobile Emergency Button Pulse */
#topInfoBar a[href^="tel"] .animate-pulse {
    animation: emergencyPulse 1.5s ease-in-out infinite;
}

@keyframes emergencyPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Smooth hover for mobile buttons */
#topInfoBar a {
    transition: all 0.2s ease;
}

/* Info bar when scrolled (if needed) */
#topInfoBar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Very small screen optimizations */
@media (max-width: 360px) {
    #topInfoBar .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    #topInfoBar h1 {
        font-size: 0.85rem !important;
    }
    
    #topInfoBar p {
        font-size: 9px !important;
    }
    
    /* Make logo smaller */
    #topInfoBar .w-10 {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    /* Compact buttons */
    #topInfoBar a[href="reports.php"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.65rem;
    }
}

/* Navigation Link Hover Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Styles */
#mobileMenu {
    display: none;
}

#mobileMenu.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile dropdown icon rotation */
.mobile-dropdown-btn .dropdown-icon.rotated {
    transform: rotate(180deg);
}

/* Mobile menu scrollbar */
#mobileMenu::-webkit-scrollbar {
    width: 4px;
}

#mobileMenu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#mobileMenu::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.5);
    border-radius: 2px;
}

/* Mobile nav link active animation */
.mobile-nav-link:active,
.mobile-dropdown-btn:active {
    transform: scale(0.98);
}

/* Desktop Dropdown */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* Hero Slider Animation */
.hero-slider {
    animation: slideShow 15s infinite;
}

@keyframes slideShow {
    0%, 30% { opacity: 1; }
    33%, 63% { opacity: 0; }
    66%, 96% { opacity: 0; }
    100% { opacity: 1; }
}

/* Video Slider Styles */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.video-slide.active {
    opacity: 1;
    z-index: 2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 22, 40, 0.7) 0%, rgba(30, 58, 95, 0.4) 100%);
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background-color: #00bcd4 !important;
    transform: scale(1.3);
}

/* Hero Section */
#home {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
}

#home .video-slide {
    object-position: right center;
}

@media (max-width: 1024px) {
    #home .video-slide {
        object-position: 70% center;
    }
}

@media (max-width: 768px) {
    #home {
        min-height: 500px;
    }
    
    #home .video-slide {
        object-position: 65% center;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Button Hover Effects */
.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--cyan-600);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: var(--green-500);
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--green-600);
    transform: scale(1.05);
}

/* Card Hover Effects */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Professional Service Card Styles */
.service-card-pro {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(0);
}

.service-card-pro:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card-pro:hover::before {
    opacity: 1;
}

/* ========================================
   Clean Service Card Design
   ======================================== */

.svc-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.svc-card:hover {
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.svc-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.svc-icon i {
    font-size: 1.5rem;
    color: #fff;
    backface-visibility: hidden;
}

.svc-card:hover .svc-icon {
    transform: rotateY(360deg);
}

.svc-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem;
}

.svc-card p {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
}

@media (max-width: 768px) {
    .svc-card {
        padding: 1.25rem 0.75rem;
    }
    
    .svc-icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }
    
    .svc-icon i {
        font-size: 1.25rem;
    }
    
    .svc-card h3 {
        font-size: 0.85rem;
    }
    
    .svc-card p {
        font-size: 0.75rem;
    }
}

/* Professional Doctor Card Styles */
.doctor-card-pro {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(0);
}

.doctor-card-pro:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.doctor-card-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
    border-radius: 16px 16px 0 0;
}

.doctor-card-pro:hover::before {
    opacity: 1;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Menu Transition */
#mobileMenu {
    transition: all 0.3s ease;
}

/* Dropdown Menu Animation */
.dropdown-menu {
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Hero Section Overlay */
.hero-overlay {
    background: linear-gradient(to right, rgba(10, 22, 40, 0.9), rgba(30, 58, 95, 0.7));
}

/* Stats Counter Animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Quick Service Icons */
.quick-service-icon {
    transition: all 0.3s ease;
}

.quick-service-icon:hover {
    background-color: var(--accent);
}

.quick-service-icon:hover i {
    color: var(--white);
}

/* Footer Styles */
.footer-link {
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Form Styles */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
    .nav-desktop {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .quick-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Emergency Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 25s linear infinite;
}

/* Running Ambulance Animation - Right to Left */
@keyframes ambulanceRun {
    0% {
        right: -100px;
        left: auto;
    }
    100% {
        right: 100%;
        left: auto;
    }
}

.ambulance-runner {
    animation: ambulanceRun 12s linear infinite;
    z-index: 10;
    right: -100px;
}

/* Mobile Ambulance Animation */
@media (max-width: 768px) {
    .ambulance-runner {
        animation: ambulanceRun 8s linear infinite;
    }
    
    .ambulance-runner i {
        font-size: 1.75rem !important;
    }
    
    .ambulance-runner .mr-2 {
        margin-right: 0.25rem;
    }
    
    .ambulance-runner .w-3 {
        width: 0.5rem;
        height: 0.5rem;
    }
}

@media (max-width: 480px) {
    .ambulance-runner {
        animation: ambulanceRun 6s linear infinite;
    }
    
    .ambulance-runner i {
        font-size: 1.5rem !important;
    }
}

/* Siren Light Flashing */
@keyframes sirenFlash {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px 8px currentColor;
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 5px 2px currentColor;
    }
}

@keyframes sirenRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
}

/* ========================================
   Mobile Menu Styles
   ======================================== */

/* Mobile Menu Container */
#mobileMenu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#mobileMenu:not(.hidden) {
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
}

/* Mobile Dropdown Animation */
.mobile-dropdown-content {
    transition: all 0.25s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.mobile-dropdown-content:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Mobile Dropdown Button */
.mobile-dropdown-btn {
    cursor: pointer;
    user-select: none;
}

.mobile-dropdown-btn:active {
    background-color: rgba(10, 22, 40, 0.8);
}

/* Dropdown Icon Rotation */
.dropdown-icon {
    transition: transform 0.25s ease;
}

.dropdown-icon.fa-chevron-up {
    transform: rotate(180deg);
}

/* Mobile Menu Button Animation */
#mobileMenuBtn {
    transition: transform 0.2s ease;
}

#mobileMenuBtn:active {
    transform: scale(0.95);
}

/* Mobile Menu Links Hover Effect */
#mobileMenu a {
    transition: all 0.2s ease;
}

#mobileMenu a:active {
    background-color: rgba(10, 22, 40, 0.5);
}

/* Ensure proper touch targets on mobile */
@media (max-width: 1279px) {
    .mobile-dropdown-btn,
    #mobileMenu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
