/**
 * Samba Template Component Library
 * Version: 1.0.0
 *
 * Description: Reusable component-based CSS for samba.php template
 * Used across multiple pages with different ACF content
 *
 * Dependencies: camp-shared.css (design tokens)
 * Inherits: Colors, typography, spacing, buttons, shadows
 *
 * Mobile-First Responsive Design
 * Breakpoints: 320px (base) → 768px (tablet) → 1024px (desktop)
 */

/* ============================================
   HERO SECTION COMPONENTS
   ============================================ */

.samba-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-primary-dark, #2B2823);
}

.samba-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-base, 1);
}

.samba-hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.samba-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.5)
    );
    z-index: var(--z-dropdown, 10);
}

.samba-hero .container {
    position: relative;
    z-index: var(--z-sticky, 20);
}

.samba-hero-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin: 0;
    padding: var(--space-lg, 24px) var(--space-base, 16px);
    line-height: 1.2;
    text-shadow: var(--shadow-lg, 0 10px 40px rgba(0, 0, 0, 0.3));
}

/* Tablet Hero Adjustments */
@media (min-width: 768px) {
    .samba-hero {
        min-height: 70vh;
    }

    .samba-hero-title {
        padding: var(--space-xl, 32px) var(--space-lg, 24px);
    }
}

/* Desktop Hero Adjustments */
@media (min-width: 1024px) {
    .samba-hero {
        min-height: 80vh;
    }

    .samba-hero-overlay {
        background: linear-gradient(
            rgba(0, 0, 0, 0.4),
            rgba(0, 0, 0, 0.6)
        );
    }
}

/* ============================================
   CONTENT SECTION COMPONENTS
   ============================================ */

.samba-section {
    padding: var(--space-2xl, 48px) 0;
    background-color: var(--color-bg-primary, #F4F3F0);
}

.samba-section.samba-section-text {
    padding: var(--space-3xl, 64px) 0;
}

.samba-section .container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 var(--space-base, 16px);
}

.samba-section-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-primary-dark, #2B2823);
    text-align: center;
    margin-bottom: var(--space-xl, 32px);
    line-height: 1.3;
}

.samba-content {
    max-width: 85%;
    margin: 0 auto;
    font-family: var(--font-primary, 'Lato', sans-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-primary, #2B2823);
}

/* Cap content width on ultra-wide displays */
@media (min-width: 1440px) {
    .samba-content {
        max-width: 900px;
    }
}

.samba-content h1,
.samba-content h2,
.samba-content h3,
.samba-content h4,
.samba-content h5,
.samba-content h6 {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    color: var(--color-primary-dark, #2B2823);
    margin-top: var(--space-xl, 32px);
    margin-bottom: var(--space-base, 16px);
}

.samba-content h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.samba-content h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

.samba-content h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.samba-content p {
    margin-bottom: var(--space-base, 16px);
}

.samba-content a {
    color: var(--color-primary-gold, #B7780D);
    text-decoration: underline;
    transition: color var(--transition-base, 0.3s ease);
}

.samba-content a:hover {
    color: var(--color-primary-dark, #2B2823);
}

.samba-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.15));
}

.samba-content ul,
.samba-content ol {
    margin-left: var(--space-lg, 24px);
    margin-bottom: var(--space-lg, 24px);
}

.samba-content li {
    margin-bottom: var(--space-sm, 8px);
}

.samba-content blockquote {
    border-left: 4px solid var(--color-primary-gold, #B7780D);
    padding-left: var(--space-lg, 24px);
    margin: var(--space-xl, 32px) 0;
    font-style: italic;
    color: var(--color-text-secondary, #666);
}

/* Mobile Content Adjustments */
@media (max-width: 767px) {
    .samba-content {
        max-width: 100%;
        padding: 0 var(--space-base, 16px);
    }
}

/* Tablet Content Adjustments */
@media (min-width: 768px) {
    .samba-section {
        padding: var(--space-3xl, 64px) 0;
    }

    .samba-section.samba-section-text {
        padding: var(--space-4xl, 80px) 0;
    }
}

/* ============================================
   CTA SECTION COMPONENTS
   ============================================ */

.samba-cta-section {
    background-color: #ffffff;
    padding: var(--space-4xl, 80px) 0;
}

.samba-cta-section .samba-section-title {
    margin-bottom: var(--space-2xl, 48px);
}

.samba-cta-group {
    display: block;
    margin-top: var(--space-xl, 32px);
}

.samba-cta-card {
    background: #ffffff;
    border-radius: 12px;
    padding: var(--space-xl, 32px);
    margin-bottom: var(--space-lg, 24px);
    box-shadow: var(--shadow-sm, 0 2px 10px rgba(0, 0, 0, 0.1));
    transition: all var(--transition-base, 0.3s ease);
    text-align: center;
    border: 2px solid transparent;
}

.samba-cta-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg, 0 10px 40px rgba(0, 0, 0, 0.15));
    border-color: var(--color-primary-gold, #B7780D);
}

.samba-cta-card-featured {
    background: linear-gradient(135deg, #F4F3F0 0%, #ffffff 100%);
    border: 2px solid var(--color-primary-gold, #B7780D);
}

.samba-cta-card-featured:hover {
    background: linear-gradient(135deg, #ffffff 0%, #F4F3F0 100%);
}

.samba-cta-icon {
    display: block;
    margin: 0 auto var(--space-base, 16px) auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.15));
    transition: all var(--transition-base, 0.3s ease);
}

.samba-cta-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.samba-cta-card:hover .samba-cta-icon {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg, 0 10px 40px rgba(0, 0, 0, 0.2));
}

/* Enhanced hover effects for desktop */
@media (min-width: 1024px) {
    .samba-cta-card {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .samba-cta-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }
}

.samba-cta-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-dark, #2B2823);
    margin-bottom: var(--space-base, 16px);
    line-height: 1.3;
}

.samba-cta-description {
    font-family: var(--font-primary, 'Lato', sans-serif);
    font-size: 1rem;
    color: var(--color-text-secondary, #666);
    margin-bottom: var(--space-lg, 24px);
    line-height: 1.6;
}

.samba-cta-card .btn {
    margin: 0 auto;
    min-width: 200px;
}

/* Tablet CTA Layout */
@media (min-width: 768px) {
    .samba-cta-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg, 24px);
    }

    .samba-cta-card {
        margin-bottom: 0;
    }

    /* Featured card spans 2 columns */
    .samba-cta-card-featured {
        grid-column: span 2;
    }
}

/* Desktop CTA Layout */
@media (min-width: 1024px) {
    .samba-cta-group {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl, 32px);
    }

    /* Featured card returns to 1 column on desktop */
    .samba-cta-card-featured {
        grid-column: span 1;
    }

    .samba-cta-card {
        padding: 56px 40px;
    }

    .samba-cta-icon {
        width: 200px;
        height: 200px;
        margin-bottom: var(--space-lg, 24px);
    }
}

/* Ultra-wide Desktop Scaling */
@media (min-width: 1440px) {
    .samba-cta-card {
        padding: 64px 48px;
    }

    .samba-cta-icon {
        width: 220px;
        height: 220px;
    }
}

/* ============================================
   BOTTOM CTA SECTION: EXPLORE CARDS
   ============================================ */

.samba-section-bottom-cta {
    background-color: #F7F7F7;
    padding: var(--space-4xl, 80px) 0;
}

.samba-section-subtitle {
    font-family: var(--font-primary, 'Lato', sans-serif);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-text-secondary, #6c757d);
    text-align: center;
    margin-bottom: var(--space-2xl, 48px);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.samba-explore-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-top: var(--space-2xl, 48px);
}

.samba-explore-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.08));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.samba-explore-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(216, 168, 27, 0.3);
}

.samba-explore-card-image {
    width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
}

.samba-explore-card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.samba-explore-card:hover .samba-explore-card-image img {
    transform: scale(1.05);
}

/* Enhanced hover effects for desktop */
@media (min-width: 1024px) {
    .samba-explore-card {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .samba-explore-card:hover {
        transform: translateY(-12px) scale(1.03);
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    }
}

.samba-explore-card-content {
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.samba-explore-card-content h4 {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--color-primary-dark, #2B2823);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.samba-explore-card-content p {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: var(--color-text-secondary, #666);
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
}

.samba-explore-btn {
    display: block;
    text-align: center;
    padding: clamp(1rem, 2vw, 1.2rem) clamp(1.5rem, 3vw, 2rem);
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 18px 18px;
    transition: all var(--transition-base, 0.3s ease);
    margin-top: auto;
}

.samba-explore-btn-primary {
    background: linear-gradient(135deg, #d8a81b 0%, #b7780d 100%);
    color: #ffffff;
}

.samba-explore-btn-primary:hover {
    background: linear-gradient(135deg, #b7780d 0%, #8f5e0a 100%);
    transform: scale(1.02);
    color: #ffffff;
}

.samba-explore-btn-secondary {
    background: #f5f5f5;
    color: var(--color-primary-dark, #2B2823);
}

.samba-explore-btn-secondary:hover {
    background: #d8a81b;
    color: #ffffff;
}

/* Tablet Explore Grid Layout */
@media (min-width: 768px) {
    .samba-explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg, 24px);
    }

    .samba-explore-card-image img {
        height: 280px;
    }
}

/* Desktop Explore Grid Layout */
@media (min-width: 1024px) {
    .samba-explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl, 32px);
    }

    .samba-explore-card-image img {
        height: 400px;
    }
}

/* Ultra-wide Desktop Explore Card Scaling */
@media (min-width: 1440px) {
    .samba-explore-card-image img {
        height: 450px;
    }
}

/* ============================================
   UTILITY COMPONENTS
   ============================================ */

/* Ensure buttons inherit from camp-shared.css */
.samba-section .btn,
.samba-cta-card .btn {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 32px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all var(--transition-base, 0.3s ease);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* Enhanced button sizes for desktop */
@media (min-width: 1024px) {
    .samba-section .btn,
    .samba-cta-card .btn {
        padding: 18px 48px;
        font-size: 1rem;
        min-width: 220px;
    }
}

/* Further scaling for ultra-wide displays */
@media (min-width: 1440px) {
    .samba-section .btn,
    .samba-cta-card .btn {
        padding: 20px 56px;
        font-size: 1.05rem;
    }
}

/* Primary Button (inherits from camp-shared) */
.samba-section .btn-primary,
.samba-cta-card .btn-primary {
    background-color: var(--color-primary-gold, #B7780D);
    color: #ffffff;
    border: 2px solid var(--color-primary-gold, #B7780D);
}

.samba-section .btn-primary:hover,
.samba-cta-card .btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary-gold, #B7780D);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.15));
}

/* Secondary Button (inherits from camp-shared) */
.samba-section .btn-secondary,
.samba-cta-card .btn-secondary {
    background-color: var(--color-primary-dark, #2B2823);
    color: #ffffff;
    border: 2px solid var(--color-primary-dark, #2B2823);
}

.samba-section .btn-secondary:hover,
.samba-cta-card .btn-secondary:hover {
    background-color: transparent;
    color: var(--color-primary-dark, #2B2823);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0, 0, 0, 0.15));
}

/* Touch-friendly buttons on mobile */
@media (max-width: 767px) {
    .samba-section .btn,
    .samba-cta-card .btn {
        width: 100%;
        min-height: 44px;
        padding: 16px 24px;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus states for keyboard navigation */
.samba-cta-card:focus-within {
    outline: 3px solid var(--color-primary-gold, #B7780D);
    outline-offset: 4px;
}

.samba-content a:focus,
.samba-cta-card .btn:focus {
    outline: 3px solid var(--color-primary-gold, #B7780D);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .samba-cta-card,
    .samba-section .btn,
    .samba-cta-card .btn,
    .samba-content a {
        transition: none;
    }

    .samba-cta-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .samba-hero-overlay {
        background: linear-gradient(
            rgba(0, 0, 0, 0.7),
            rgba(0, 0, 0, 0.7)
        );
    }

    .samba-cta-card {
        border: 2px solid var(--color-primary-dark, #2B2823);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .samba-hero {
        min-height: auto;
        page-break-after: always;
    }

    .samba-hero-overlay {
        display: none;
    }

    .samba-cta-section {
        display: none;
    }

    .samba-content {
        max-width: 100%;
    }
}
