/* ================================
   UNIFIED SECTION SYSTEM
   Consistent width and spacing across all sections
   ================================ */

/* ================================
   SECTION WRAPPER - GLOBAL
   ================================ */
.section-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding-inline: 24px;
    margin-block: 120px;
}

@media (max-width: 1024px) {
    .section-wrapper {
        padding-inline: 20px;
        margin-block: 80px;
    }
}

@media (max-width: 768px) {
    .section-wrapper {
        padding-inline: 16px;
        margin-block: 60px;
    }
}

/* ================================
   SECTION CONTENT WIDTH OVERRIDES
   Match container width (1280px) for consistency
   ================================ */

/* Ensure all section content areas align */
.hero-content,
.problem-section .container,
.solution-section .container,
.quick-features-section .container,
.cta-section .container,
.footer .container {
    max-width: 1280px !important;
    margin: 0 auto;
}

/* Section headers should be slightly narrower for readability */
.section-header {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/* Full-width sections maintain container padding */
.problem-section,
.solution-section,
.quick-features-section,
.cta-section {
    width: 100%;
}

/* ================================
   GRID ALIGNMENT
   Ensure cards and content align with container edges
   ================================ */
.grid {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ================================
   VERTICAL SPACING RHYTHM
   ================================ */
section + section {
    margin-top: 0; /* Handled by individual section padding */
}

/* Problem Section */
.problem-section {
    padding: 120px 0;
}

/* Solution Section */
.solution-section {
    padding: 120px 0;
}

/* Features Section */
.quick-features-section {
    padding: 120px 0;
}

/* CTA Section */
.cta-section {
    padding: 120px 0;
}

@media (max-width: 1024px) {
    .problem-section,
    .solution-section,
    .quick-features-section,
    .cta-section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .problem-section,
    .solution-section,
    .quick-features-section,
    .cta-section {
        padding: 60px 0;
    }
}

/* ================================
   RESPONSIVE CONTAINER BEHAVIOR
   ================================ */

/* Desktop (≥1280px): Use full max-width */
@media (min-width: 1280px) {
    .container,
    .hero-content {
        max-width: 1280px;
    }
}

/* Tablet (768-1279px): Use 90% viewport with max */
@media (min-width: 768px) and (max-width: 1279px) {
    .container,
    .hero-content {
        max-width: 90vw;
    }
}

/* Mobile (≤767px): Full width with padding */
@media (max-width: 767px) {
    .container,
    .hero-content {
        width: 100%;
        padding-inline: 16px;
    }
    
    /* Stack content and left-align for better scanning */
    .section-header {
        text-align: left;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */

/* Constrain content to reading width */
.content-narrow {
    max-width: 680px;
    margin: 0 auto;
}

/* Constrain content to medium width */
.content-medium {
    max-width: 1000px;
    margin: 0 auto;
}

/* Full container width */
.content-full {
    max-width: 1280px;
    margin: 0 auto;
}

/* ================================
   ALIGNMENT HELPERS
   ================================ */

.align-center {
    text-align: center;
    align-items: center;
}

.align-left {
    text-align: left;
    align-items: flex-start;
}

.align-right {
    text-align: right;
    align-items: flex-end;
}

/* Mobile always left-aligned */
@media (max-width: 768px) {
    .align-center,
    .align-right {
        text-align: left;
        align-items: flex-start;
    }
}

/* ================================
   VISUAL DEBUGGING (Remove in production)
   ================================ */
/*
.container,
.hero-content,
.section-header {
    outline: 1px dashed rgba(255, 0, 0, 0.3);
}

.container::before,
.hero-content::before {
    content: 'Container: ' attr(class);
    position: absolute;
    top: 0;
    left: 0;
    font-size: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
}
*/

