/* ===== Custom Styles for Duy-Med ===== */

/* ---------- General ---------- */
html {
    scroll-behavior: smooth;
}

::selection {
    background-color: #0891b2;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0891b2, #0e7490);
    border-radius: 100px;
}

/* ---------- Header ---------- */
#main-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link.active {
    color: #0891b2;
    font-weight: 600;
}

/* ---------- Hero Slider ---------- */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-slide {
        min-height: 400px;
    }
}

.hero-slide .slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide .slide-content {
    position: relative;
    z-index: 10;
}

/* Swiper Navigation */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    color: #0f172a;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: #0891b2;
    color: #fff;
    transform: scale(1.05);
}

.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 700;
}

.hero-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.hero-slider .swiper-pagination-bullet-active {
    background: #0891b2;
    width: 36px;
    border-radius: 100px;
}

/* ---------- Slide Animations ---------- */
.hero-slide .slide-badge {
    animation: slideInDown 0.6s ease both;
    animation-delay: 0.3s;
}

.hero-slide .slide-title {
    animation: slideInUp 0.7s ease both;
    animation-delay: 0.5s;
}

.hero-slide .slide-subtitle {
    animation: slideInUp 0.7s ease both;
    animation-delay: 0.6s;
}

.hero-slide .slide-desc {
    animation: slideInUp 0.7s ease both;
    animation-delay: 0.7s;
}

.hero-slide .slide-cta {
    animation: slideInUp 0.7s ease both;
    animation-delay: 0.9s;
}

.hero-slide .slide-image {
    animation: slideInRight 0.8s ease both;
    animation-delay: 0.5s;
}

.swiper-slide-active .slide-badge,
.swiper-slide-active .slide-title,
.swiper-slide-active .slide-subtitle,
.swiper-slide-active .slide-desc,
.swiper-slide-active .slide-cta,
.swiper-slide-active .slide-image {
    animation-play-state: running;
}

.swiper-slide:not(.swiper-slide-active) .slide-badge,
.swiper-slide:not(.swiper-slide-active) .slide-title,
.swiper-slide:not(.swiper-slide-active) .slide-subtitle,
.swiper-slide:not(.swiper-slide-active) .slide-desc,
.swiper-slide:not(.swiper-slide-active) .slide-cta,
.swiper-slide:not(.swiper-slide-active) .slide-image {
    animation: none;
    opacity: 0;
}

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

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------- About Section ---------- */
.about-section {
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.play-btn {
    position: relative;
    z-index: 10;
}

.play-btn::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(8, 145, 178, 0.3);
    animation: playPulse 2s ease infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0; }
}

/* ---------- Features Section ---------- */
.features-section {
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* ---------- Phone Pulse Animation ---------- */
.phone-pulse {
    animation: phonePulse 2s ease infinite;
}

@keyframes phonePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(8, 145, 178, 0); }
}

/* ---------- Hexagon Pattern ---------- */
.hex-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L55 17.5V42.5L30 55L5 42.5V17.5L30 5Z' fill='none' stroke='%230891b2' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
}

/* ---------- Gradient Text ---------- */
.text-gradient {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ---------- Loader (optional) ---------- */
.page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #0891b2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Mobile Menu Active ---------- */
#mobile-menu.open {
    max-height: 500px;
}

.hamburger-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger-active .hamburger-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}
