/* ==========================================================
   PREMIUM ENHANCEMENT - ANIMATIONS & ADVANCED EFFECTS
   ========================================================== */

/* Scroll Reveal Animation Base */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grid children */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible>*:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(7) { transition-delay: 0.7s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(8) { transition-delay: 0.8s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(9) { transition-delay: 0.9s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(10) { transition-delay: 1.0s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(11) { transition-delay: 1.1s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(12) { transition-delay: 1.2s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(13) { transition-delay: 1.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(14) { transition-delay: 1.4s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(15) { transition-delay: 1.5s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible>*:nth-child(n+16) { transition-delay: 1.6s; opacity: 1; transform: translateY(0); }

/* Floating CTA Button */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px var(--color-accent), 0 0 20px rgba(184, 134, 11, 0.3); }
    50% { box-shadow: 0 0 10px var(--color-accent), 0 0 40px rgba(184, 134, 11, 0.5); }
}

/* Parallax Hero Background */
.hero-parallax {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.hero-parallax::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
}

/* Topographic Background Pattern */
.topo-bg {
    position: relative;
    background-color: #000000;
    z-index: 0;
}

.topo-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/topo-pattern.png');
    background-repeat: repeat;
    background-size: 800px;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.topo-bg h1, .topo-bg h2, .topo-bg h3, .topo-bg h4, .topo-bg h5, .topo-bg h6,
.topo-bg p, .topo-bg span, .topo-bg li, .topo-bg a:not(.btn), .topo-bg label,
.topo-bg strong, .topo-bg .section-title, .topo-bg .section-subtitle {
    color: #FFFFFF !important;
}

/* Override white text inside white-background cards */
.topo-bg .service-card-premium h3,
.topo-bg .service-card-premium h4 {
    color: var(--color-primary) !important;
}
.topo-bg .service-card-premium p,
.topo-bg .service-card-premium span,
.topo-bg .service-card-premium li {
    color: var(--color-text-main) !important;
}
.topo-bg .service-card-premium a:not(.btn) {
    color: var(--color-accent) !important;
}
.topo-bg .service-card-premium .service-icon i {
    color: var(--color-accent) !important;
}

/* Override white text inside white-background cards within topo-bg */
.topo-bg .team-card h3,
.topo-bg .sa-service-card h3,
.topo-bg .sa-region-card h3,
.topo-bg .service-card h3 {
    color: var(--color-primary) !important;
}
.topo-bg .team-card p,
.topo-bg .team-card span,
.topo-bg .team-card .role,
.topo-bg .sa-service-card p,
.topo-bg .sa-service-card span,
.topo-bg .sa-region-card p,
.topo-bg .sa-region-card span,
.topo-bg .service-card p,
.topo-bg .service-card span {
    color: var(--color-text-main) !important;
}

/* Review cards have dark backgrounds -- force light text */
.topo-bg .review-card h3,
.topo-bg .review-card h4 {
    color: #FFFFFF !important;
}
.topo-bg .review-card p,
.topo-bg .review-card span,
.topo-bg .review-card .review-text {
    color: #bbbbbb !important;
}
.topo-bg .review-card .review-stars {
    color: #FFD700 !important;
}
.topo-bg .review-card .reviewer-name,
.topo-bg .review-card .review-author {
    color: var(--color-accent) !important;
}
.topo-bg .sa-service-card a:not(.btn),
.topo-bg .sa-region-card a:not(.btn),
.topo-bg .service-card a:not(.btn) {
    color: var(--color-accent) !important;
}

/* Override white text inside white-background contact form card */
.topo-bg .contact-form-card h3 {
    color: var(--color-primary) !important;
}
.topo-bg .contact-form-card p,
.topo-bg .contact-form-card span,
.topo-bg .contact-form-card li {
    color: var(--color-text-main) !important;
}
.topo-bg .contact-form-card label {
    color: #333 !important;
}
.topo-bg .contact-form-card a:not(.btn) {
    color: var(--color-accent) !important;
}
.topo-bg .contact-form-card .subtitle {
    color: #666 !important;
}

/* Override topo-bg white text bleed into service detail page elements */
.topo-bg .content-card-premium h2 {
    color: var(--color-accent) !important;
}
.topo-bg .content-card-premium h3 {
    color: #fff !important;
}
.topo-bg .content-card-premium p,
.topo-bg .content-card-premium li {
    color: #bbb !important;
}
.topo-bg .content-card-premium a:not(.btn) {
    color: var(--color-accent) !important;
}
.topo-bg .trust-item h4 {
    color: var(--color-accent) !important;
}
.topo-bg .trust-item p {
    color: #999 !important;
}
.topo-bg .internal-links a {
    color: var(--color-accent) !important;
}
.topo-bg .internal-links a:hover {
    color: #000 !important;
}
.topo-bg .faq-item h3 {
    color: #fff !important;
}
.topo-bg .faq-item p {
    color: #bbb !important;
}
.topo-bg .use-case-list li {
    color: #ccc !important;
}
.topo-bg .process-steps li {
    color: #ccc !important;
}

/* All dark hero sections: force white text */
.about-hero h1, .about-hero h2, .about-hero p, .about-hero-overlay h1,
.reviews-hero h1, .reviews-hero h2, .reviews-hero p,
.contact-hero h1, .contact-hero h2, .contact-hero p,
.services-hero h1, .services-hero h2, .services-hero p,
.sa-hero h1, .sa-hero h2, .sa-hero p,
.hero-premium h1, .hero-premium h2, .hero-premium p {
    color: #FFFFFF !important;
}

/* About Hero - full image, no cropping */
.about-hero-img {
    position: relative;
    overflow: hidden;
}

.about-hero-img img {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(0.85);
}

.about-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 2;
}

.about-hero-overlay h1 {
    color: #FFFFFF !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* Statistics Counter Style */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 0;
}

/* Enhanced Service Cards */
.service-card-premium {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card-premium:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Masonry Review Grid */
.reviews-grid-wrapper {
    column-count: 3;
    column-gap: 2rem;
    padding: 2rem 0;
}

.review-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    break-inside: avoid;
    transition: all 0.3s ease;
    opacity: 0;
    animation: dropIn 0.8s ease forwards;
}

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

/* GLOBAL: Center ALL hero content, headings, subtitles, buttons across every page */
.hero-parallax, .hero-premium, .services-hero, .about-hero, .reviews-hero,
.contact-hero, .process-hero, .location-hero, .tool-hero, .sa-hero, .faq-hero {
    text-align: center !important;
}

.hero-parallax .hero-content, .hero-premium .hero-content, .services-hero .container,
.about-hero .container, .reviews-hero .container, .contact-hero .container {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-actions, .cta-buttons {
    display: flex;
    justify-content: center !important;
    width: 100%;
}

/* ==========================================================
   TEAM SECTION POLISH (No Bubbles, Centered Layout)
   ========================================================== */

/* Force Rectangular Layout (No Bubbles) for ALL team cards */
.team-card img {
    width: 100% !important;
    height: 380px !important;
    object-fit: cover !important;
    object-position: center 20% !important;
    border-radius: 8px 8px 0 0 !important;
    border: none !important;
    margin: 0 !important;
}

/* Feature Card (Full Width for Crew Photo) */
.team-card-feature {
    grid-column: 1 / -1 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    border: 2px solid var(--color-accent) !important;
    background: transparent !important;
    margin-bottom: 3rem;
}

.feature-card-image-wrap {
    width: 100% !important;
    height: 480px !important;
    overflow: hidden !important;
}

.feature-card-image-wrap img {
    height: 100% !important;
    border-radius: 0 !important;
}

.feature-card-content {
    padding: 2rem !important;
    text-align: center !important;
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%) !important;
}

.feature-card-content h3 {
    margin-bottom: 0.5rem !important;
    color: white !important;
}

.feature-card-content .role {
    color: var(--color-accent) !important;
    font-weight: 600;
}

/* Crew Grid Centering (Ava & Bruce) */
.crew-grid-centered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
    justify-content: center !important;
    max-width: 1200px;
    margin: 0 auto !important;
}

.crew-grid-centered .team-card {
    flex: 0 1 380px !important;
    margin: 0 !important;
}

/* Crew section layout */
.crew-header-spacing {
    margin-top: 4rem;
}

.crew-feature-wrap {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.crew-pair-grid {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 600px) {
    .crew-pair-grid {
        grid-template-columns: 1fr;
    }
}

.team-section-header {
    margin-top: 5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Team Grid Centering (Family) */
.team-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2.5rem !important;
    justify-content: center !important;
    max-width: 1200px;
    margin: 0 auto !important;
}

.team-grid .team-card,
.crew-pair-grid .team-card {
    flex: 0 1 340px !important;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.team-grid .team-card:hover,
.crew-pair-grid .team-card:hover {
    transform: translateY(-5px);
}

.team-card-content {
    padding: 1.5rem;
    text-align: center;
    background: #111;
}

.team-card-content h3 {
    color: #FFFFFF !important;
}

.team-card-content .role {
    color: var(--color-accent) !important;
}

/* Responsive Scaling */
@media (max-width: 992px) {
    .feature-card-image-wrap { height: 350px !important; }
    .team-card img { height: 300px !important; }
}

@media (max-width: 768px) {
    .crew-grid-centered .team-card,
    .team-grid .team-card {
        flex: 1 1 300px !important;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .team-card img { height: 260px !important; }
    .feature-card-image-wrap { height: 250px !important; }
}
