/*
 * Dr Alka Goel's Obs & Gyne Clinic - Custom Styles
 */

/* =============================================
   BASE & RESET
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

::selection {
    background-color: #E91E63;
    color: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
}

/* =============================================
   LOADER
   ============================================= */
#loader {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-pulse {
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* =============================================
   HEADER
   ============================================= */
#main-header {
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #E91E63;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* Mobile hamburger */
.hamburger span.active:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger span.active:nth-child(2) {
    opacity: 0;
}

.hamburger span.active:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* =============================================
   FLOATING CARDS ANIMATION
   ============================================= */
.floating-card {
    animation: floatingCard 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    animation-delay: 2s;
}

@keyframes floatingCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* =============================================
   SERVICE CARDS
   ============================================= */
.service-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card:hover {
    box-shadow: 0 12px 40px rgba(233, 30, 99, 0.15) !important;
    border-color: rgba(233, 30, 99, 0.2) !important;
}

.service-card:hover .w-12 {
    background: linear-gradient(135deg, #E91E63, #6A1B9A) !important;
}

.service-card:hover .w-12 i {
    color: #FFFFFF !important;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E91E63, #6A1B9A);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* =============================================
   WHY CHOOSE CARDS
   ============================================= */
.why-card {
    position: relative;
    overflow: hidden;
}

.why-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E91E63, #F8BBD0);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.why-card:hover::after {
    transform: scaleX(1);
}

/* =============================================
   FAQ ACCORDION
   ============================================= */
.faq-item.active .faq-toggle i.fa-chevron-down {
    transform: rotate(180deg);
    color: #E91E63;
}

.faq-item.active .faq-answer {
    display: block;
    animation: faqSlide 0.3s ease;
}

.faq-item.active .faq-toggle {
    color: #E91E63;
}

.faq-item.active .faq-toggle .w-8,
.faq-item.active .faq-toggle span:last-child {
    color: #E91E63;
}

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

/* =============================================
   TESTIMONIAL SWIPER
   ============================================= */
.testimonial-swiper .swiper-pagination {
    bottom: 0 !important;
}

.testimonial-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #F8BBD0;
    opacity: 1;
    transition: all 0.3s ease;
}

.testimonial-swiper .swiper-pagination-bullet-active {
    background: #E91E63;
    width: 30px;
    border-radius: 5px;
}

/* =============================================
   COUNTER ANIMATION
   ============================================= */
.counter {
    font-variant-numeric: tabular-nums;
}

/* =============================================
   SCROLL TO TOP
   ============================================= */
#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FFF8FB;
}

::-webkit-scrollbar-thumb {
    background: #F8BBD0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E91E63;
}

/* =============================================
   UTILITY ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =============================================
   BUTTON HOVER RIPPLE
   ============================================= */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* =============================================
   IMAGE HOVER ZOOM
   ============================================= */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.7s ease;
}

.img-zoom:hover img {
    transform: scale(1.08);
}

/* =============================================
   GRADIENT TEXT
   ============================================= */
.gradient-text {
    background: linear-gradient(135deg, #E91E63, #6A1B9A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============================================
   GLASS MORPHISM
   ============================================= */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* =============================================
   FORM STYLES
   ============================================= */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */
@media (max-width: 768px) {
    .floating-card {
        display: none !important;
    }
}

@media (max-width: 640px) {
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* =============================================
   SMOOTH REVEAL FOR GSAP
   ============================================= */
.gsap-reveal {
    opacity: 0;
    transform: translateY(40px);
}

.gsap-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    #main-header,
    .floating-button,
    #scroll-top,
    .testimonial-swiper,
    footer {
        display: none !important;
    }
}
