/* Custom CSS for YesNet Website */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes hoverLift {
    from {
        transform: translateY(0) scale(1);
    }
    to {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Intersection Observer animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

/* Custom button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Custom card hover effects */
.card-hover {
    transition: all 0.25s ease-out;
}

.card-hover:hover {
    transform: translateY(-4px) scale(1.01);
}

/* Navigation backdrop blur effect enhancement */
.nav-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Hero section background overlay */
.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(23, 23, 23, 0.8) 0%,
        rgba(23, 23, 23, 0.6) 50%,
        rgba(23, 23, 23, 0.7) 100%
    );
}

/* Hero text shadow for better readability over images */
.hero-text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Reusable overlay classes for consistent image overlays */
.image-overlay-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(23, 23, 23, 0.85), rgba(23, 23, 23, 0.65));
}

.image-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(23, 23, 23, 0.85) 0%,
        rgba(23, 23, 23, 0.65) 50%,
        rgba(23, 23, 23, 0.75) 100%
    );
}

/* Custom focus styles for accessibility */
.focus-visible {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
    border-radius: inherit;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
}

/* Mobile menu animation */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

.mobile-menu-exit {
    animation: slideUp 0.3s ease-out;
}

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

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

/* FAQ accordion animations */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.open {
    max-height: 200px;
}

.faq-chevron {
    transition: transform 0.2s ease-out;
}

.faq-chevron.rotated {
    transform: rotate(180deg);
}

/* Testimonial card styling */
.testimonial-card {
    position: relative;
    transition: all 0.25s ease-out;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #E6F0FF;
    font-family: serif;
    line-height: 1;
}

/* Feature card icon animations */
.feature-icon {
    transition: all 0.3s ease-out;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: #14B8A6;
}

/* Trust signals styling */
.trust-signal {
    transition: all 0.2s ease-out;
}

.trust-signal:hover {
    transform: scale(1.05);
}

/* Loading animations for images */
.image-loading {
    background: linear-gradient(90deg, #F5F5F5 25%, #E5E5E5 50%, #F5F5F5 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Plan card special styling */
.plan-card {
    position: relative;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDFA 100%);
}

.plan-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(0, 102, 255, 0.05) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.6;
    }
    
    .section-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* Enhanced hover effects for interactive elements */
.interactive-element {
    transition: all 0.2s ease-out;
}

.interactive-element:hover {
    transform: translateY(-1px);
}

/* Custom shadow utilities */
.shadow-card-hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.shadow-accent {
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-neutral-50 {
        background-color: #FFFFFF;
    }
    
    .text-neutral-700 {
        color: #000000;
    }
    
    .border-neutral-200 {
        border-color: #000000;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-neutral-900,
    .bg-neutral-800 {
        background: white !important;
        color: black !important;
    }
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.container-padding {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 640px) {
    .container-padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) {
    .container-padding {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* Additional responsive utilities */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
}

@media (min-width: 641px) {
    .desktop-hidden {
        display: none;
    }
}

/* Sticky navigation enhancements */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Section spacing consistency */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 9rem;
        padding-bottom: 9rem;
    }
}

/* Enhanced focus styles for better accessibility */
.focus-ring {
    position: relative;
}

.focus-ring:focus-visible::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #0066FF;
    border-radius: inherit;
    pointer-events: none;
}

/* Loading spinner for dynamic content */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E5E5;
    border-top: 4px solid #14B8A6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom selection styling */
::selection {
    background-color: #E6F0FF;
    color: #171717;
}

::-moz-selection {
    background-color: #E6F0FF;
    color: #171717;
}

/* Enhanced button states */
.button-pressed {
    transform: scale(0.98);
    transition: transform 0.1s ease-out;
}

/* Grid layout enhancements */
.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Text truncation utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Availability Modal Styles */
.modal-backdrop {
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.modal-backdrop:not(.hidden) {
    opacity: 1;
}

.modal-container {
    transform: scale(0.95) translateY(20px);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms ease-out;
}

.modal-backdrop:not(.hidden) .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal result animations */
.modal-result {
    opacity: 0;
    transform: translateY(10px);
    transition: all 300ms ease-out;
}

.modal-result:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Modal form field focus styles */
#availability-form input:focus,
#availability-form select:focus {
    outline: none;
    border-color: #14B8A6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Modal submit button disabled state */
.modal-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Modal close button hover effect */
.modal-close:hover {
    transform: scale(1.05) rotate(90deg);
}

/* Smooth scrollbar for modal content */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: #F5F5F5;
    border-radius: 3px;
}

.modal-container::-webkit-scrollbar-thumb {
    background: #D4D4D4;
    border-radius: 3px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: #A3A3A3;
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
    .modal-backdrop {
        padding: 0;
    }

    .modal-container {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* Animation for spinner */
@keyframes modalSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
    animation: modalSpinner 1s linear infinite;
}
