/* -----------------------------------
   SISTEMA DE GRID Y CONTENEDORES
----------------------------------- */

.container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

/* Por defecto (móvil-first): 1 columna */
.grid-2,
.grid-3,
.grid-4 {
    grid-template-columns: 1fr;
}

/* Control de Navbar en móviles: oculto por defecto */
.navbar-center-controls {
    display: none !important;
}

/* Tablets / Mínimo 600px */
@media (min-width: 600px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktops / Mínimo 768px */
@media (min-width: 768px) {
    .navbar-center-controls {
        display: flex !important;
    }
}

/* Pantallas grandes / Mínimo 900px */
@media (min-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* -----------------------------------
   LAYOUT DE VISTAS
----------------------------------- */

.view {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.3s ease;
}

.view-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.view-header h1 {
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    letter-spacing: -0.06em; /* Reducción de espacio entre caracteres */
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.view-header p {
    font-size: 1.05rem;
    color: var(--color-muted);
    max-width: 600px;
    margin: 0 auto;
}

.view-content {
    margin-top: 2rem;
}

.view-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

/* -----------------------------------
   FORMULARIOS Y GRUPOS
----------------------------------- */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

/* -----------------------------------
   TARJETAS Y CONTENEDORES
----------------------------------- */

.cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

.card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* -----------------------------------
   SECCIONES ESPECIALES
----------------------------------- */

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

/* -----------------------------------
   ANIMACIONES
----------------------------------- */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------
   MOBILE-FIRST FLUID COLUMNS
----------------------------------- */
.view-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.layout-main-col, .layout-side-col {
    width: 100%;
    flex: none;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .view-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    .layout-main-col {
        flex: 0 0 75%;
        max-width: calc(75% - 12px);
    }
    .layout-side-col {
        flex: 0 0 25%;
        max-width: calc(25% - 12px);
    }
}
