/* =============================================
   Aged Care Information - Custom Styles
   ============================================= */

/* CSS Variables */
:root {
    --aged-primary: #4a7c9e;
    --aged-secondary: #2c3e50;
    --aged-accent: #f4b400;
    --aged-bg: #f7f9fb;
    --aged-text: #2d3748;
    --aged-muted: #718096;
    --aged-card: #ffffff;
    --aged-radius: 12px;
    --aged-shadow: 0 4px 20px rgba(0,0,0,0.06);
    --aged-dark: #0f1f2e;
    --aged-blue: #0f4c75;
}

/* Smooth Scrolling */
html.aged-care {
    scroll-behavior: smooth;
}

html.aged-care body {
    background: var(--aged-bg);
    color: var(--aged-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* =============================================
   Hero Section
   ============================================= */
.hero-bg {
    background: linear-gradient(135deg, #0f4c75aa, #1b262cdd), url('https://cdn.abacus.ai/images/9efb012d-f492-4b50-a50d-789845658942.png') center/cover no-repeat;
}

.hero-overlay {
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1), transparent 35%), 
                radial-gradient(circle at 80% 0%, rgba(255,255,255,0.08), transparent 30%);
}

/* =============================================
   Authority Section Gradient
   ============================================= */
.authority-gradient {
    background: linear-gradient(135deg, #0f4c75, #1b262c);
}

/* =============================================
   CTA Section Gradient
   ============================================= */
.cta-gradient {
    background: linear-gradient(135deg, #0f4c75, #1b262c);
}

/* =============================================
   Contact Section Gradient
   ============================================= */
.contact-gradient {
    background: linear-gradient(135deg, #0f4c75, #1b262c);
}

/* =============================================
   QR Code Page
   ============================================= */
.qr-page-bg {
    background: linear-gradient(180deg, #f7f9fb 0%, #ffffff 100%);
}

.qr-info-gradient {
    background: linear-gradient(135deg, #4a7c9e 0%, #0f4c75 100%);
}

/* =============================================
   Popup Header Gradient
   ============================================= */
.popup-header-gradient {
    background: linear-gradient(135deg, #4a7c9e 0%, #0f4c75 100%);
}

/* =============================================
   FAQ Accordion Styles
   ============================================= */
.faq-item {
    overflow: hidden;
}

.faq-toggle {
    cursor: pointer;
    user-select: none;
}

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

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

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

/* =============================================
   Navigation Scroll Effect
   ============================================= */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

/* =============================================
   Mobile CTA Animation
   ============================================= */
#mobile-cta.visible {
    transform: translateY(0);
}

/* =============================================
   Popup Animations
   ============================================= */
.popup-fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* =============================================
   Form Focus States
   ============================================= */
input:focus,
textarea:focus {
    border-color: var(--aged-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 124, 158, 0.1);
}

/* =============================================
   Button Hover Effects
   ============================================= */
a[href^="tel:"],
button[type="submit"],
.cta-button {
    transition: all 0.2s ease;
}

a[href^="tel:"]:hover,
button[type="submit"]:hover:not(:disabled),
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =============================================
   Card Hover Effects
   ============================================= */
.testimonial-card,
.credential-card,
.trust-card {
    transition: all 0.2s ease;
}

.testimonial-card:hover,
.credential-card:hover,
.trust-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* =============================================
   Social Proof Notification Animation
   ============================================= */
.notification-toast {
    animation: slideInLeft 0.3s ease-out;
}

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

/* =============================================
   Loading Spinner
   ============================================= */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s ease-in-out infinite;
}

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

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
    /* Hide some elements on mobile for cleaner view */
    .desktop-only {
        display: none !important;
    }
    
    /* Adjust padding for mobile */
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile CTA bar spacing */
    #mobile-cta.visible + footer {
        padding-bottom: 120px;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    #mobile-cta,
    #popup-overlay,
    nav,
    .fixed {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

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

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

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

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

/* =============================================
   Custom Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--aged-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d6a88;
}

/* =============================================
   Selection Color
   ============================================= */
::selection {
    background: var(--aged-accent);
    color: var(--aged-dark);
}

/* =============================================
   Image Optimizations
   ============================================= */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}
