/**
 * Flexible Content Layout Styles
 * Additional CSS for flexible content blocks
 */

/* ========================================
   LAYOUT: IMAGE + TEXT
   ======================================== */
.image-text-section {
    padding: 4rem 0;
}

.image-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.layout-image-right .image-text-grid {
    direction: rtl;
}

.layout-image-right .image-text-grid > * {
    direction: ltr;
}

.image-text-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.image-text-content .section-label {
    display: inline-block;
    margin-bottom: 1rem;
}

.image-text-content .headline-large {
    margin-bottom: 1.5rem;
}

.image-text-content .prose {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .image-text-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .layout-image-right .image-text-grid {
        direction: ltr;
    }
}

/* ========================================
   LAYOUT: STATS BAR
   ======================================== */
.stats-bar {
    padding: 3rem 0;
}

.stats-default {
    background: var(--md-sys-color-surface);
}

.stats-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.stats-dark {
    background: #000;
}

.stats-gradient {
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-surface) 100%);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    line-height: 1;
}

.stats-primary .stat-number {
    color: inherit;
}

.stat-suffix {
    font-size: 0.6em;
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========================================
   LAYOUT: TESTIMONIALS
   ======================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--md-sys-color-surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-quote {
    margin-bottom: 1.5rem;
}

.testimonial-quote p {
    font-size: 1.1rem;
    line-height: 1.7;
    font-style: italic;
    margin-top: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info strong {
    display: block;
    font-size: 1rem;
}

.testimonial-info span {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* ========================================
   LAYOUT: SPECS TABLE
   ======================================== */
.specs-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.specs-table th,
.specs-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.specs-table th {
    font-weight: 600;
    width: 40%;
    color: var(--md-sys-color-primary);
}

.specs-table tr.even {
    background: var(--md-sys-color-surface);
}

/* ========================================
   LAYOUT: CTA SECTION
   ======================================== */
.cta-section {
    padding: 4rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.cta-boxed {
    background: var(--md-sys-color-surface);
}

.cta-boxed::before {
    display: none;
}

.cta-boxed .cta-content {
    background: linear-gradient(135deg, var(--md-sys-color-primary), #FFB300);
    border-radius: 24px;
    padding: 4rem 3rem;
    color: #000;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

/* ========================================
   LAYOUT: GALLERY
   ======================================== */
.gallery-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-grid.columns-3,
    .gallery-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   LAYOUT: FAQ ACCORDION
   ======================================== */
.faq-accordion {
    margin-top: 2rem;
}

.faq-item {
    background: var(--md-sys-color-surface);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    text-align: left;
}

.faq-question:hover {
    background: var(--md-sys-color-surface-variant);
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

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

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* ========================================
   LAYOUT: CONTACT FORM
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.contact-form-wrapper {
    background: var(--md-sys-color-surface);
    border-radius: 16px;
    padding: 2rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   LAYOUT: TEXT CONTENT / PROSE
   ======================================== */
.prose {
    line-height: 1.8;
}

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ========================================
   FEATURES GRID
   ======================================== */
.features-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.features-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.features-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.features-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .features-grid.columns-3,
    .features-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   HERO VARIATIONS
   ======================================== */
.hero-full {
    min-height: 100vh;
}

.hero-medium {
    min-height: 60vh;
}

.hero-small {
    min-height: 40vh;
    padding: 4rem 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: #000;
}

.hero-label {
    display: inline-block;
    background: var(--md-sys-color-primary);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
