/* ============================================
   Homepage Specific Styles
   Loading, Gallery, Testimonials, FAQ, Animations
   ============================================
   ⚠️ PRESERVATION LOCKED: Layout critical.
   ============================================ */

/* === Loading Screen === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 10px;
    color: var(--white);
    margin-bottom: var(--space-md);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-bar {
    width: 200px;
    height: 2px;
    background: var(--gray-800);
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0;
    background: var(--white);
    animation: loadingBar 1.5s ease-in-out forwards;
}

@keyframes loadingBar {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

/* === Gallery Section === */
.gallery-section {
    background: var(--black-deep);
    padding: var(--space-xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-sm);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 500px;
    /* Taller for portrait photos */
    border-radius: 4px;
}

/* ... */

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* Focus on faces/top of image */
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.gallery-overlay span {
    display: none;
    /* Hidden as per user request */
}

.gallery-item:hover .gallery-placeholder {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-placeholder span {
    opacity: 0;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ============================================
   Testimonials Section - Ultra Premium SaaS Design
   ============================================ */

.testimonials-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 50%, #0a0a0a 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Ambient glow background */
.testimonials-section::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin-top: 12px;
    letter-spacing: 0.5px;
}

.testimonials-slider-wrapper {
    position: relative;
    margin-top: 60px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Base Card Styling */
.testimonial-card {
    background: linear-gradient(165deg, rgba(25, 25, 25, 0.95) 0%, rgba(12, 12, 12, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.1), transparent, transparent);
    animation: rotate 10s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.testimonial-card:hover .card-glow {
    opacity: 1;
}

.testimonial-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Featured Card Special Styling */
.testimonial-card.featured {
    border-color: rgba(212, 175, 55, 0.3);
    background: linear-gradient(165deg, rgba(35, 30, 20, 0.98) 0%, rgba(15, 13, 8, 0.99) 100%);
    transform: scale(1.03);
    z-index: 2;
}

.testimonial-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 10%, #d4af37 50%, transparent 90%);
}

.testimonial-card.featured:hover {
    transform: translateY(-12px) scale(1.05);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #d4af37 0%, #b8962c 100%);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5);
    z-index: 10;
    white-space: nowrap;
}

.featured-badge svg {
    width: 14px;
    height: 14px;
}

/* Rating Section */
.testimonial-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stars {
    display: flex;
    gap: 4px;
}

.stars svg {
    width: 18px;
    height: 18px;
    color: #d4af37;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.stars svg.half {
    color: rgba(212, 175, 55, 0.4);
}

.rating-score {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Quote Mark */
.quote-mark {
    position: absolute;
    top: 32px;
    left: 32px;
    opacity: 0.08;
}

.quote-mark svg {
    width: 60px;
    height: 60px;
    color: #d4af37;
}

/* Testimonial Text */
.testimonial-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 28px;
    min-height: 95px;
    position: relative;
    z-index: 1;
}

/* Author Section */
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.author-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #d4af37;
    position: relative;
    transition: all 0.3s ease;
}

.author-avatar.premium {
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.verified-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0a0a;
}

.verified-badge svg {
    width: 12px;
    height: 12px;
    color: #fff;
}

.testimonial-card:hover .author-avatar {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
}

.author-info {
    flex: 1;
}

.author-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.author-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.author-status svg {
    width: 14px;
    height: 14px;
    color: #22c55e;
}

.author-status.vip {
    color: #d4af37;
}

.author-status.vip svg {
    color: #d4af37;
}

.author-status.new svg {
    color: #3b82f6;
}

.author-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 70px;
    background: linear-gradient(165deg, rgba(25, 25, 25, 0.9) 0%, rgba(12, 12, 12, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    padding: 24px 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 30px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.6);
}

.stat-icon.gold svg {
    color: #d4af37;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.4));
}

.stat-content {
    text-align: right;
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Responsive */
@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-card.featured {
        transform: none;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 60px 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card.featured {
        order: -1;
    }

    .testimonial-card {
        padding: 24px;
    }

    .stats-bar {
        flex-wrap: wrap;
        border-radius: 24px;
        padding: 20px;
        gap: 20px;
    }

    .stat-item {
        padding: 10px 20px;
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }

    .stat-divider {
        display: none;
    }

    .stat-number {
        font-size: 1.4rem;
    }
}

/* === FAQ Section === */
.faq-section {
    background: var(--black-deep);
    padding: var(--space-xl) 0;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--glass-border);
    margin-bottom: var(--space-sm);
    transition: var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--gray-600);
}

.faq-item.active {
    border-color: var(--white);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: transparent;
    border: none;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: right;
}

.faq-question:hover {
    background: var(--glass-bg-light);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--gray-500);
    transition: var(--transition-fast);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--white);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 var(--space-md) var(--space-md);
}

.faq-answer p {
    color: var(--gray-400);
    line-height: 1.8;
}

/* === Scroll Reveal Animations === */
.reveal-item,
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-item.revealed,
.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for grid items */
.reveal-section.revealed .reveal-item {
    transition-delay: 0.1s;
}

.reveal-section.revealed .reveal-item:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal-section.revealed .reveal-item:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal-section.revealed .reveal-item:nth-child(4) {
    transition-delay: 0.4s;
}

.reveal-section.revealed .reveal-item:nth-child(5) {
    transition-delay: 0.5s;
}

/* === Responsive === */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 300px;
        /* Slightly shorter on mobile but still substantial */
    }

    .loading-logo {
        font-size: 1.75rem;
        letter-spacing: 6px;
    }

    .loading-bar {
        width: 150px;
    }
}