/* Global Styles */
html {
    scroll-behavior: smooth;
}

/* Student Place Button Styling */
.studentbtn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile adjustments for student place button */
@media (max-width: 640px) {
    .studentbtn {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.5rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        min-width: auto !important;
        max-width: 100px !important;
    }
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover: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);
}

/* Parallax Background Styles */
.parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    will-change: transform;
}

/* Ensure proper spacing between sections */
section {
    position: relative;
    z-index: 1;
}

/* Floating Contact Buttons Styles */
.whatsapp-button, .messenger-button {
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
}

.whatsapp-button:hover, .messenger-button:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: scale(1.1) !important;
}

/* Pulse animation for floating buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(34, 197, 94, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.messenger-button {
    animation: pulseBlue 2s infinite;
}

@keyframes pulseBlue {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(59, 130, 246, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Mobile responsiveness for floating buttons */
@media (max-width: 768px) {
    .fixed.bottom-6.right-6 {
        bottom: 1rem;
        right: 1rem;
    }
    
    .whatsapp-button, .messenger-button {
        /* padding: 0.75rem; */
    }
    
    .whatsapp-button i, .messenger-button i {
        font-size: 1.5rem;
    }
}

/* Hero section specific styling */
#home {
    position: relative;
    z-index: 0;
    min-height: 70vh;
    display: block;
}

/* Ensure subjects section has proper positioning */
#subjects {
    position: relative;
    z-index: 2;
}

/* Pricing card button positioning */
.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.pricing-card > button:last-child {
    margin-top: auto;
    width: 100%;
}

/* Desktop: Keep absolute positioning for equal height cards */
@media (min-width: 1024px) {
    .pricing-card {
        padding-bottom: 80px !important;
    }
    
    .pricing-card > button:last-child {
        position: absolute;
        bottom: 24px;
        left: 24px;
        right: 24px;
        width: calc(100% - 48px);
    }
}

/* Most Popular Plan Styling */
.most-popular {
    border: 2px solid #f59e0b;
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.most-popular:hover {
    transform: scale(1.08);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.most-popular button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.4);
}

.most-popular button:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.6);
}

/* Form field highlighting */
.border-green-500 {
    border-color: #10b981 !important;
}

.bg-green-50 {
    background-color: #ecfdf5 !important;
}

/* Custom Quote Popup Animations */
#customQuotePopup .bg-white {
    transition: transform 0.3s ease-in-out;
}

#customQuotePopup.hidden {
    opacity: 0;
    pointer-events: none;
}

#customQuotePopup:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease-in-out;
}

.messenger-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive Optimizations */
@media (max-width: 640px) {
    /* Pricing Cards Mobile Optimization */
    .pricing-card {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem !important;
    }
    
    .pricing-card h3 {
        font-size: 1.375rem !important;
        margin-bottom: 1rem !important;
    }
    
    .pricing-card .space-y-3 {
        margin-bottom: 1.25rem !important;
        gap: 0.5rem;
    }
    
    .pricing-card .space-y-3 > div {
        padding: 0.5rem 0 !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
    }
    
    .pricing-card .space-y-3 > div span:first-child {
        font-size: 0.875rem !important;
        flex: 0 0 auto;
    }
    
    .pricing-card .space-y-3 > div span:last-child,
    .pricing-card .space-y-3 > div button {
        flex-shrink: 0;
    }
    
    .pricing-card .text-left.mb-6 {
        margin-bottom: 1.25rem !important;
    }
    
    .pricing-card ul {
        font-size: 0.8125rem !important;
        line-height: 1.5 !important;
    }
    
    .pricing-card ul li {
        margin-bottom: 0.375rem !important;
    }
    
    .pricing-card ul li i {
        font-size: 0.75rem !important;
        margin-right: 0.375rem !important;
    }
    
    .pricing-card > button:last-child {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        width: 100% !important;
        margin-top: 1rem !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    /* Most Popular Badge Mobile */
    .most-popular {
        transform: scale(1) !important;
        border-width: 2px !important;
        margin-top: 1rem !important;
    }
    
    .most-popular:hover {
        transform: scale(1) !important;
    }
    
    .most-popular > div.absolute {
        top: -0.75rem !important;
    }
    
    .most-popular > div.absolute span {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.875rem !important;
    }
    
    /* Hero Section Mobile */
    #home {
        height: 60vh !important;
        padding-top: 4rem !important;
    }
    
    #home h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    #home p {
        font-size: 0.875rem !important;
        margin-bottom: 1rem !important;
        padding: 0 0.5rem !important;
    }
    
    #home a {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Form Mobile Optimization */
    .form-input {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .form-label {
        font-size: 0.875rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Section Padding Mobile */
    section {
        padding: 2rem 0 !important;
    }
    
    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }
    
    /* Custom Quote Popup Mobile */
    #customQuotePopup .bg-white {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    #studentPlacePopup .bg-white {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    /* Parallax background mobile fix */
    .parallax-bg {
        background-attachment: scroll !important;
    }
    
    /* Floating buttons mobile */
    .fixed.bottom-6 {
        bottom: 1.5rem !important;
        right: 1rem !important;
    }
    
    .whatsapp-button,
    .messenger-button {
        width: 48px !important;
        height: 48px !important;
    }
    
    /* Calendar mobile */
    #calendarBody > div {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Contact form mobile */
    #contactForm input,
    #contactForm textarea {
        font-size: 1rem !important;
    }
    
    /* Booking form mobile */
    #bookingForm input,
    #bookingForm select,
    #bookingForm textarea {
        font-size: 1rem !important;
    }
    
    /* Tables mobile */
    table {
        font-size: 0.875rem !important;
    }
    
    /* Navigation mobile */
    nav .text-lg {
        font-size: 1rem !important;
    }
    
    nav h1 {
        font-size: 1.125rem !important;
    }
}

/* Tablet Responsive */
@media (min-width: 641px) and (max-width: 1023px) {
    .pricing-card {
        padding: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .pricing-card h3 {
        font-size: 1.5rem !important;
    }
    
    .pricing-card ul {
        font-size: 0.875rem !important;
    }
    
    .pricing-card > button:last-child {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 1.5rem !important;
    }
    
    .most-popular {
        transform: scale(1) !important;
    }
    
    .most-popular:hover {
        transform: scale(1.02) !important;
    }
    
    #home h1 {
        font-size: 2.5rem !important;
    }
    
    #home p {
        font-size: 1.125rem !important;
    }
    
    /* Parallax background tablet fix */
    .parallax-bg {
        background-attachment: scroll !important;
    }
    
    .studentbtn {
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}

/* Large Screen Optimization */
@media (min-width: 1025px) {
    .pricing-card:hover {
        transform: translateY(-8px) !important;
    }
    
    .most-popular:hover {
        transform: scale(1.08) !important;
    }
}
