/* Custom Styles - Extracted from inline styles */
/* Department of Telemedicine Website */

/* ============================================
   GLOBAL STYLES
   ============================================ */

html {
    scroll-behavior: smooth;
    font-size: 80% !important;
    /* Force reduce content size by another 10% (80% total) */
}

body {
    font-family: 'Public Sans', sans-serif;
    overflow-x: hidden;
    background-color: #ffffff;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(0, 90, 156, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 150, 136, 0.03), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */

.carousel-item {
    transition: opacity 1s ease-in-out;
}

/* ============================================
   SCROLL-BASED REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-bottom {
    transform: translateY(50px);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger animation delays for sequential reveals */
.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal:nth-child(4) {
    transition-delay: 0.4s;
}

/* ============================================
   SERVICE MODAL STYLES
   ============================================ */

.service-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.service-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.service-modal {
    background: #ffffffdb;
    width: 95%;
    max-width: 1400px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 85vh;
    max-height: 900px;
}

.service-modal-overlay.active .service-modal {
    transform: scale(1) translateY(0);
}

/* Desktop modal layout */
@media (min-width: 768px) {
    .service-modal {
        flex-direction: row;
        height: 560px;
        max-width: 1120px;
    }
}

/* Mobile specific adjustments for popup */
@media (max-width: 767px) {
    .service-modal {
        position: relative;
        width: 90%;
        max-width: 30rem;
        height: auto;
        min-height: 200px;
        max-height: 85vh;
        margin: auto;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-radius: 1.25rem;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    .modal-media {
        height: 12rem;
        min-height: auto;
        width: 100%;
        padding: 0;
        background: white;
        position: relative;
    }

    .modal-media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: none;
    }

    .modal-content {
        flex-grow: 1;
        overflow-y: auto;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .chart-container {
        height: 14rem;
        gap: 0;
        justify-content: space-around;
    }
}

/* Dark Mode support */
.dark .service-modal {
    background: #1a2430;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Media Section */
.modal-media {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.modal-media img {
    transform: scale(1.25);
    max-width: 90%;
    max-height: 90%;
}

@media (min-width: 768px) {
    .modal-media {
        width: 50%;
        height: 100%;
    }
}

/* Modal Content Section */
.modal-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 20;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: rotate(90deg);
}

/* Service Icons and Values */
.service-icon {
    font-size: 22px;
    color: #666666;
}

.service-value {
    font-size: 20px;
    font-weight: 600;
    color: #343434;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Jump Rotate Animation */
@keyframes jumpRotate {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(-3deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(-8px) rotate(2deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.animate-jump-rotate {
    animation: jumpRotate 4s ease-in-out infinite;
}

/* Bounce Slow Animation */
@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

/* Spin Slow Custom Animation */
@keyframes spin-slow-custom {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.animate-spin-slow-custom {
    animation: spin-slow-custom 60s linear infinite;
}

/* ============================================
   CHART STYLES
   ============================================ */

.chart-container {
    margin-top: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 50px;
    height: 250px;
    width: 100%;
    position: relative;
    border-bottom: 2px solid #e2e8f0;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: 100%;
    justify-content: flex-end;
    position: relative;
    margin: 0;
}

.chart-bar {
    width: 50px;
    background: #005A9C;
    border-radius: 8px 8px 0 0;
    transition: height 1s cubic-bezier(0.16, 1, 0.3, 1);
    height: 0;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.chart-label {
    position: absolute;
    bottom: -35px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
    width: 100%;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-value {
    position: absolute;
    top: -25px;
    font-size: 1rem;
    font-weight: 700;
    color: #005A9C;
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}

.chart-bar.active .chart-value {
    opacity: 1;
}

/* ============================================
   SPLASH SCREEN STYLES
   ============================================ */

#splash-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 90, 156, 0.3);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    width: 80%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    animation: smooth-zoom 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@media (min-width: 768px) {
    .splash-logo {
        max-width: 800px;
    }
}

@keyframes smooth-zoom {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   SERVICE IMAGE HOVER EFFECT
   ============================================ */

#features .group:hover img {
    transform: scale(1.05);
    transition: transform 0.5s ease-in-out;
}

/* ============================================
   KEYBOARD FOCUS INDICATORS
   ============================================ */

/* Focus indicators for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Modal close button focus */
.modal-close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Skip to content link focus */
.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 1rem 1.5rem;
    margin: 1rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Interactive elements focus */
.group:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}