/* =========================================
   CONAFE - SISTEMA DE DISEÑO MODERNO 2024
   ========================================= */

/* ====== VARIABLES CSS ====== */
:root {
    /* Colores Institucionales - Vino */
    --primary: #722f37;
    --primary-dark: #5c2233;
    --primary-light: #9a4a54;
    --primary-lighter: #faf2f4;
    --primary-light-2: #f4d5da;
    --accent-wine: #722f37;
    --accent-wine-light: #9a4a54;
    
    /* Escala de colores vino */
    --wine-900: #5c2233;
    --wine-800: #722f37;
    --wine-700: #9a4a54;
    --wine-600: #b87d90;
    --wine-500: #c997a6;
    --wine-400: #d8b1bc;
    --wine-300: #e7cbd2;
    --wine-200: #f0d5da;
    --wine-100: #f7e9ec;
    --wine-50: #faf2f4;
    --wine-25: #fef9fa;
    
    /* Acentos complementarios */
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-orange: #ea580c;
    --gold: #d4c4a0;
    --gold-light: #ebe3d0;
    --cream: #fdfcfb;
    --blush: #fce7f3;
    
    /* Estados */
    --success: #059669;
    --success-light: #d1fae5;
    --success-lighter: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #2563eb;
    --info-light: #dbeafe;
    
    /* Fondo y texto */
    --bg-primary: #fef9fa;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #722f37 0%, #5c2233 100%);
    --text-primary: #5c2233;
    --text-secondary: #722f37;
    --text-muted: #9a4a54;
    --text-light: #ffffff;
    --border: #f4d5da;
    --border-light: #faf2f4;
    
    /* Sombras con tono vino */
    --shadow-sm: 0 1px 3px rgba(114, 47, 55, 0.06);
    --shadow: 0 4px 12px rgba(114, 47, 55, 0.08);
    --shadow-md: 0 8px 24px rgba(114, 47, 55, 0.1);
    --shadow-lg: 0 16px 48px rgba(114, 47, 55, 0.12);
    --shadow-xl: 0 24px 64px rgba(114, 47, 55, 0.15);
    
    /* Bordes */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --navbar-height: 64px;
}

/* ====== RESET ====== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

/* ====== TIPOGRAFÍA ====== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

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

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--wine-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--wine-700);
}

/* ====== BOTONES ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--wine-500) 0%, var(--wine-600) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(18, 164, 168, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-700) 100%);
    box-shadow: 0 6px 16px rgba(18, 164, 168, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--wine-600);
    border: 2px solid var(--wine-200);
}

.btn-secondary:hover {
    background: var(--wine-50);
    border-color: var(--wine-400);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
}

/* ====== FORMULARIOS ====== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--wine-400);
    box-shadow: 0 0 0 3px var(--wine-50);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b5a60' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ====== TARJETAS ====== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-primary);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.card-header-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

/* ====== ALERTAS ====== */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--success-light);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: var(--danger-light);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: var(--warning-light);
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: var(--info-light);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ====== TABLAS ====== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.table tr:hover td {
    background: var(--wine-25);
}

.table tr:last-child td {
    border-bottom: none;
}

/* ====== BADGES ====== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--wine-100);
    color: var(--wine-700);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: #856404;
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

/* ====== PÁGINAS DE AUTENTICACIÓN ====== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--wine-50) 0%, var(--cream) 50%, var(--blush) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-800) 100%);
    color: white;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.auth-body {
    padding: 2rem;
}

.auth-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.auth-footer a {
    color: var(--wine-600);
    font-weight: 500;
}

/* ====== PÁGINA REGISTRO ====== */
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--wine-50) 0%, var(--cream) 50%, var(--blush) 100%);
}

.register-container {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 320px 1fr;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.register-info {
    background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-800) 100%);
    color: white;
    padding: 2rem 1.5rem;
}

.register-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.register-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.register-form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-grid .form-group.full {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .register-container {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .register-info {
        padding: 1.5rem;
    }
}

/* ====== LANDING PAGE ====== */
.header-index {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--wine-700);
}

.header-logo-icon {
    font-size: 1.8rem;
}

.header-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--wine-700);
    cursor: pointer;
    padding: 0.5rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-link:hover {
    background: var(--wine-50);
    color: var(--wine-700);
}

.nav-arrow {
    font-size: 0.7rem;
    transition: transform var(--transition);
}

.nav-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    transition: all var(--transition);
}

.nav-dropdown-item:hover {
    background: var(--wine-50);
    color: var(--wine-700);
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

.nav-btn {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--transition);
}

.nav-btn-outline {
    border: 1px solid var(--wine-300);
    color: var(--wine-600);
}

.nav-btn-outline:hover {
    background: var(--wine-50);
}

.nav-btn-primary {
    background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-700) 100%);
    color: white;
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, var(--wine-700) 0%, var(--wine-800) 100%);
    color: white;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 1001;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Móvil */
.sidebar-index {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-xl);
}

.sidebar-index.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--wine-700);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-nav {
    padding: 1rem 0;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    transition: all var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--wine-50);
    color: var(--wine-700);
}

.sidebar-link .icon {
    width: 24px;
    text-align: center;
}

.sidebar-btn {
    display: block;
    margin: 0.5rem 1.25rem;
    padding: 0.75rem 1rem;
    text-align: center;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--transition);
}

.sidebar-btn-outline {
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.sidebar-btn-outline:hover {
    background: var(--wine-50);
    border-color: var(--wine-300);
}

.sidebar-btn-primary {
    background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-700) 100%);
    color: white;
}

.sidebar-btn-primary:hover {
    background: linear-gradient(135deg, var(--wine-700) 0%, var(--wine-800) 100%);
    color: white;
}

/* Main Content Landing */
.main-index {
    margin-top: var(--navbar-height);
}

/* Hero Section */
.hero-index {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--wine-50) 0%, var(--cream) 100%);
    text-align: center;
}

.hero-index-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-index-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--wine-800);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-index-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-index-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-700) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(92, 34, 54, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(92, 34, 54, 0.4);
    color: white;
}

.hero-btn-outline {
    background: transparent;
    color: var(--wine-700);
    border: 2px solid var(--wine-300);
}

.hero-btn-outline:hover {
    background: var(--wine-50);
    border-color: var(--wine-400);
}

/* Carousel */
.carousel-index {
    padding: 3rem 2rem;
    background: var(--bg-white);
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 300px;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(74, 26, 44, 0.3) 0%, transparent 50%);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--wine-700);
    cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 1rem;
}

.carousel-btn-next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition);
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Services Section */
.services-index {
    padding: 4rem 2rem;
    background: var(--bg-primary);
}

.services-header {
    text-align: center;
    margin-bottom: 3rem;
}

.services-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wine-800);
    margin-bottom: 0.5rem;
}

.services-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.service-card:hover .service-card-image img {
    transform: scale(1.1);
}

.service-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.service-card-content {
    padding: 1.5rem;
}

.service-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-card-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--wine-600);
    font-weight: 500;
    transition: all var(--transition);
}

.service-card-btn:hover {
    color: var(--wine-800);
    gap: 0.6rem;
}

/* Footer Landing */
.footer-index {
    background: linear-gradient(135deg, var(--wine-800) 0%, var(--wine-900) 100%);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-index-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-index-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-column-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-index-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.footer-index-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* ====== SIDEBAR ADMIN (Layout Dashboard) ====== */
.navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: linear-gradient(90deg, #5c2233, #92345a);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
}

.navbar-toggle {
    display: none;
    background: #fff;
    border: 2px solid var(--wine-600);
    border-radius: 6px;
    font-size: 1.4rem;
    color: var(--wine-700);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--wine-400) 0%, var(--wine-600) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Sidebar Admin */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: linear-gradient(180deg, #5c2233 0%, #4a1c2a 50%, #3d1522 100%);
    overflow-y: auto;
    z-index: 999;
    transition: transform var(--transition);
}

.sidebar-section {
    padding: 0.5rem 0;
}

.sidebar-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin: 0.15rem 0.5rem;
}

.sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.sidebar .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(4px);
}

.sidebar .sidebar-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-left: 3px solid #5ee5e9;
}

.sidebar .sidebar-link .icon {
    width: 24px;
    text-align: center;
}

/* Main Content Dashboard */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    padding: 2rem;
    background: var(--bg-primary);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--wine-500) 0%, var(--wine-700) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.breadcrumb a {
    color: var(--wine-600);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: var(--wine-100);
    color: var(--wine-600);
}

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Results Layout (Sidebar + Content) */
.results-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Search Bar */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.search-bar .form-control {
    padding-left: 40px;
}

/* Reveal Animation */
.reveal {
    animation: reveal 0.5s ease-out;
}

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

/* ====== FOOTER SIDEBAR ====== */
.main-footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-white);
    margin-left: var(--sidebar-width);
}

.main-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-index-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .header-menu-btn {
        display: block;
    }
    
    .header-nav {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-footer {
        margin-left: 0;
    }
    
    .results-layout {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-index-title {
        font-size: 2.25rem;
    }
    
.carousel-item {
    height: 300px;
    }

@media (max-width: 992px) {
    .carousel-item {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 200px;
    }
    
    .navbar-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        height: 180px;
    }
}
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-index-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-index {
        padding: 4rem 1.5rem;
    }
    
    .hero-index-title {
        font-size: 1.85rem;
    }
    
    .hero-index-text {
        font-size: 1rem;
    }
    
    .hero-btn {
        padding: 0.85rem 1.5rem;
    }
    
    .carousel-item {
        height: 250px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .page-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .navbar-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-index-title {
        font-size: 1.5rem;
    }
    
    .carousel-item {
        height: 200px;
    }
    
    .auth-card {
        margin: 1rem;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1.25rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
}

/* ====== UTILIDADES ====== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--wine-700); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.bg-white { background: var(--bg-white); }
.bg-light { background: var(--bg-primary); }
.bg-wine { background: var(--wine-100); color: var(--wine-700); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.hidden { display: none; }
.visible { display: block; }

/* ====== VALIDACIÓN DE FORMULARIOS ====== */
.form-control.is-valid,
.form-select.is-valid,
textarea.is-valid {
    border-color: var(--success) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232d8a56'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

.form-control.is-invalid,
.form-select.is-invalid,
textarea.is-invalid {
    border-color: var(--danger) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c94040'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(201, 64, 64, 0.2);
    border-color: var(--danger);
}

.form-control.is-valid:focus,
.form-select.is-valid:focus,
textarea.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(45, 138, 86, 0.2);
    border-color: var(--success);
}

.field-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.field-error::before {
    content: "⚠️";
    font-size: 0.75rem;
}

.field-success {
    color: var(--success);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.field-success::before {
    content: "✓";
    font-size: 0.75rem;
}

/* Tooltip de ayuda */
.field-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.input-group-append .btn {
    border-left: none;
}

.input-group-prepend .btn {
    border-right: none;
}

/* Indicador de fortaleza de contraseña */
.password-strength {
    display: flex;
    gap: 3px;
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    transition: background var(--transition);
}

.password-strength-bar.weak { background: var(--danger); }
.password-strength-bar.medium { background: var(--warning); }
.password-strength-bar.strong { background: var(--success); }

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.password-strength-text.weak { color: var(--danger); }
.password-strength-text.medium { color: var(--warning); }
.password-strength-text.strong { color: var(--success); }

/* Validación inline para checkboxes y radios */
.form-check-input.is-valid ~ .form-check-label,
.form-check-input:checked.is-valid ~ .form-check-label {
    color: var(--success);
}

/* Contador de caracteres */
.char-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning { color: var(--warning); }
.char-counter.danger { color: var(--danger); }

/* Animación de validación */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group.shake .form-control.is-invalid {
    animation: shake 0.3s ease-in-out;
}

/* Formulario con errores */
.form-has-errors {
    position: relative;
}

.form-error-summary {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.form-error-summary h4 {
    color: var(--danger);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-error-summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

.form-error-summary li {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.form-error-summary li::marker {
    color: var(--danger);
}
