/* ==========================================================================
   Responsive Design System - design.css
   ========================================================================== */

:root {
    /* Typografía compartida */
    --font-size-base: 16px;
    --line-height-base: 1.5;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Borders & Shadows */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --box-shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --box-shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    
    /* Container Widths */
    --container-max-width: 1200px;
}

/* ==========================================================================
   Reset & Base Styles minimalistas
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout & Grid System
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* Flexible Grid Framework */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--spacing-md) * -1);
    margin-right: calc(var(--spacing-md) * -1);
}

/* Column Base */
.col, [class*="col-"] {
    position: relative;
    width: 100%;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* Default 1 column on mobile */
.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   Responsive Utilities & Media Queries
   ========================================================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    
    .hide-sm { display: none !important; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    
    .hide-md { display: none !important; }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    
    .hide-lg { display: none !important; }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-max-width);
    }
    .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
    
    .hide-xl { display: none !important; }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

/* Responsive Imagery */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Responsive Navigation Menu
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--surface-color, #1e293b);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--box-shadow-sm);
    position: relative;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color, #3b82f6);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
}

.nav-item a {
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    display: block;
}

.nav-item a:not(.btn-primary-small) {
    color: var(--text-primary, #f8fafc);
}

.nav-item a:not(.btn-primary-small):hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-color, #3b82f6);
}

/* Checkbox Toggle Hack for Mobile Menu */
.nav-toggle,
.nav-toggle-label {
    display: none;
}

.nav-toggle-label {
    cursor: pointer;
    font-size: 1.5rem;
    padding: var(--spacing-sm);
    color: var(--text-primary, #ffffff);
}

/* ==========================================================================
   Responsive Sections (Column on Mobile/Tablet -> Row on Desktop)
   ========================================================================== */
.section-responsive {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

/* Mobile & Tablet (Up to 991px) */
@media (max-width: 991px) {
    /* Responsive Navigation Dropdown */
    .nav-toggle-label {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--surface-color, #1e293b);
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-md) 0;
        box-shadow: var(--box-shadow-md);
        display: none;
    }
    
    .nav-item {
        text-align: center;
    }
    
    .nav-toggle:checked ~ .nav-menu {
        display: flex;
    }
}

/* Desktop sizing (992px and up) */
@media (min-width: 992px) {
    .section-responsive {
        flex-direction: row;
        align-items: stretch;
    }
}
