/* Main CSS File - The Florida Psychiatric Center */
/* This file contains custom CSS that supplements Tailwind utilities */

/* ========================================
   Root Variables & Base Styles
   ======================================== */

:root {
    --color-primary: #1a4d6d;
    --color-secondary: #4a90a4;
    --color-accent: #f8f9fa;
    --spacing-unit: 8px;
}

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

/* ========================================
   Typography Enhancements
   ======================================== */

.font-heading {
    letter-spacing: -0.02em;
}

/* ========================================
   Navigation Styles
   ======================================== */

/* Dropdown menu animations */
.group:hover .group-hover\:visible {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

#mobile-menu.hidden {
    max-height: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 1000px;
}

/* ========================================
   Button Styles
   ======================================== */

/* Primary button hover effect */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   Card Components
   ======================================== */

/* Service card hover effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* ========================================
   Form Styles
   ======================================== */

/* Custom focus states for form inputs */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* ========================================
   FAQ Accordion Styles
   ======================================== */

.faq-item button svg {
    transition: transform 0.3s ease;
}

.faq-item button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.faq-answer {
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.faq-answer:not(.hidden) {
    max-height: 500px;
}

/* ========================================
   Hero Section Styles
   ======================================== */

/* Animated gradient background */
.hero-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   Loading States
   ======================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* ========================================
   Accessibility Enhancements
   ======================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }
    
    main {
        margin: 0;
        padding: 0;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ========================================
   Responsive Image Containers
   ======================================== */

.image-container {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* ========================================
   Custom Scrollbar
   ======================================== */

/* For Webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ========================================
   Utility Classes
   ======================================== */

.text-balance {
    text-wrap: balance;
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1400px;
}

/* Aspect ratio containers */
.aspect-16-9 {
    padding-bottom: 56.25%;
}

.aspect-4-3 {
    padding-bottom: 75%;
}

.aspect-square {
    padding-bottom: 100%;
}