/* Layout and responsive styles */

/* Global overflow prevention - but allow animations */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Logo header */
.logo-header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.logo-header img {
    width: 140px;
    height: 100px;
}

/* Main container */
.main-container {
    display: flex;
    flex-direction: column;
    background-color: var(--color-primary);
    width: 100%;
    max-width: 100%;
    /* ALLOW horizontal scroll only for animations, then hide afterward */
    overflow-x: hidden;
}

/* Container widths */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.section-container {
    z-index: 40;
    width: 100%;
    max-width: 100%;
    flex: 1;
    background-color: #b7a69c;
    padding: 120px 14.58vw;
    box-sizing: border-box;
    /* IMPORTANT: Allow animations but prevent final overflow */
    overflow-x: hidden;
    position: relative; /* Create stacking context for animations */
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 64px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative; /* Allow proper animation positioning */
}

/* Grid systems */
.grid {
    display: grid;
    width: 100%;
    box-sizing: border-box;
}

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

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

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.flex-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
    min-width: 0;
}

/* Gap utilities */
.gap-xs { gap: 8px; }
.gap-sm { gap: 16px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 32px; }
.gap-xl { gap: 40px; }
.gap-2xl { gap: 64px; }

/* Padding utilities */
.p-xs { padding: 8px; }
.p-sm { padding: 16px; }
.p-md { padding: 24px; }
.p-lg { padding: 32px; }
.p-xl { padding: 40px; }

/* Margin utilities */
.m-xs { margin: 8px; }
.m-sm { margin: 16px; }
.m-md { margin: 24px; }
.m-lg { margin: 32px; }
.m-xl { margin: 40px; }

/* Width and height utilities */
.w-full { 
    width: 100%; 
    max-width: 100%;
}
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Responsive breakpoints */
@media (max-width: 1200px) {
    .section-container {
        padding: 80px 80px;
    }
    
    .logo-header img {
        width: 120px;
        height: 85px;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 40px 20px;
    }
    
    .logo-header {
        top: 16px;
    }
    
    .logo-header img {
        width: 100px;
        height: 70px;
    }
    
    .container {
        padding: 10px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .section-content {
        gap: 32px;
        width: 100%;
        max-width: 100%;
        /* Still allow animations on mobile */
    }
}

@media (max-width: 480px) {
    .section-container {
        padding: 20px 16px;
    }
    
    .container {
        padding: 10px;
    }
    
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .logo-header img {
        width: 90px;
        height: 65px;
    }
    
    .section-content {
        gap: 24px;
    }
}

/* Hidden utilities */
.hidden { display: none !important; }
.invisible { visibility: hidden; }

@media (max-width: 768px) {
    .hidden-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hidden-desktop { display: none !important; }
}