/**
 * File: /assets/css/main.css
 * Description: Core typography, section spacing, and structural responsive grids.
 * Dependency: Global CSS variables must be loaded from style.css first.
 */

/* ==========================================================================
   1. RESPONSIVE TYPOGRAPHY SYSTEM
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Fluid scaling ensures massive text on desktop but prevents overflow on mobile */
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 900; line-height: 1.1; text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 900; text-transform: uppercase; }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

p {
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

p:last-child {
    margin-bottom: 0;
}

/* Text Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.text-cyan { color: var(--accent-cyan); }
.text-uppercase { text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================================================
   2. STRUCTURAL GRIDS & LAYOUTS
   ========================================================================== */
/* * The Master Matrix 
 * Used for the Packages Archive, Filtered Shortcodes, and Blog Fallback.
 * Auto-fits columns to a minimum of 320px wide.
 */
.grid-matrix,
.dna-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    width: 100%;
}

/* * Contact Page Split Grid
 * Wider base column width (400px) to accommodate the Google Map and Form side-by-side.
 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    align-items: start;
}

/* * Testimonials Matrix
 * 3-column desktop layout that collapses to 1 column on mobile.
 */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

/* * Footer 4-Column Grid
 */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 48px;
}

/* Mobile Overrides to prevent horizontal scrolling on small viewports */
@media (max-width: 768px) {
    .contact-grid,
    .grid-matrix,
    .dna-plans-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   3. COMMON SECTION PADDING & WRAPPERS
   ========================================================================== */
/* Ensures the footer is always pushed to the bottom of the viewport even if page content is short */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

/* Standardized Section Spacing */
.section-padding {
    padding: 100px 0;
}

.section-padding-sm {
    padding: 60px 0;
}

/* Tighten spacing on mobile for better UX */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    .section-padding-sm {
        padding: 40px 0;
    }
}

/* ==========================================================================
   4. MEDIA & IMAGE UTILITIES
   ========================================================================== */
figure {
    margin: 0 0 1.5rem 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Useful for injecting WP native images inside the visual builder */
.img-rounded {
    border-radius: 12px;
    overflow: hidden;
}

.img-shadow {
    box-shadow: var(--shadow-md);
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}