/* ============================================
   Evento Universitario - Styles
   Framework para Desarrollo Web - Unidad III
   ============================================ */

:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1642;
    --accent: #ff6f00;
    --accent-light: #ffa040;
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f9a825;
    --info: #0277bd;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---- NAVBAR ---- */
.navbar {
    background: var(--primary-dark);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 14px 0;
}

.navbar-brand .icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    color: rgba(255,255,255,0.85);
    padding: 16px 16px;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-bottom-color: var(--accent);
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: var(--shadow-hover);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 1001;
    overflow: hidden;
}

.nav-links > li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.dropdown-menu a:last-child { border-bottom: none; }

.dropdown-menu a:hover {
    background: var(--bg);
    color: var(--primary);
    padding-left: 26px;
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* ---- HERO ---- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero .btn-hero {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.hero .btn-hero:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,111,0,0.4);
}

/* ---- CONTAINER ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ---- CARDS ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.card-body p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* ---- STATS ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-light); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}
.btn-sm { padding: 6px 16px; font-size: 0.82rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- FORMS ---- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}

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 d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ---- TABLES ---- */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

thead {
    background: var(--primary);
    color: #fff;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.88rem;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(26,35,126,0.03);
}

/* ---- BADGES ---- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #e8f5e9; color: var(--success); }
.badge-warning { background: #fff8e1; color: #f57f17; }
.badge-danger { background: #ffebee; color: var(--danger); }
.badge-info { background: #e3f2fd; color: var(--info); }
.badge-primary { background: #e8eaf6; color: var(--primary); }

/* ---- MODAL ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 95%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.8;
}

.modal-close:hover { opacity: 1; }

.modal-body {
    padding: 24px;
}

/* ---- TABS ---- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
    overflow-x: auto;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- ALERTS ---- */
.alert {
    padding: 14px 20px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #e8f5e9; color: var(--success); border-left: 4px solid var(--success); }
.alert-danger { background: #ffebee; color: var(--danger); border-left: 4px solid var(--danger); }
.alert-info { background: #e3f2fd; color: var(--info); border-left: 4px solid var(--info); }
.alert-warning { background: #fff8e1; color: #f57f17; border-left: 4px solid var(--warning); }

/* ---- SECTIONS ---- */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 24px;
}

.section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 40px 0;
    border-radius: 2px;
}

/* ---- PAGE CONTENT ---- */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 40px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.page-header p {
    opacity: 0.85;
    font-size: 1rem;
}

.content-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 24px;
}

.content-card h2 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.content-card h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.content-card ul, .content-card ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.content-card li {
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.7;
}

.content-card p {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 12px;
    line-height: 1.7;
}

.term {
    background: var(--bg);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 0 6px 6px 0;
}

.term strong {
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.term p {
    margin-top: 4px;
    margin-bottom: 0;
}

/* ---- FOOTER ---- */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 24px 20px;
    font-size: 0.85rem;
    margin-top: 40px;
}

.footer a { color: var(--accent-light); }

/* ---- TOAST ---- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease;
    min-width: 260px;
}

.toast-success { background: var(--success); }
.toast-danger { background: var(--danger); }
.toast-info { background: var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---- FEATURE GRID ---- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
}

.feature-item h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.88rem;
}

/* ---- EVENT LIST ITEM ---- */
.event-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    transition: var(--transition);
    align-items: center;
}

.event-item:hover {
    box-shadow: var(--shadow-hover);
}

.event-date-box {
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    min-width: 60px;
}

.event-date-box .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date-box .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-info h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.event-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ---- LOGIN BOX ---- */
.auth-box {
    max-width: 420px;
    margin: 0 auto;
    padding: 30px 0;
}

/* ---- AR SPECIFIC ---- */
.ar-scene {
    background: linear-gradient(135deg, #0d0d2b, #1a1a4e, #2d1b69);
    border-radius: var(--radius);
    padding: 40px;
    color: #fff;
    text-align: center;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.ar-scene::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100,100,255,0.1) 0%, transparent 60%);
    animation: arPulse 4s ease-in-out infinite;
}

@keyframes arPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.ar-model-viewer {
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 60px 20px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.phone-mockup {
    max-width: 300px;
    margin: 20px auto;
    background: #111;
    border-radius: 30px;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.phone-screen {
    background: #1a1a2e;
    border-radius: 20px;
    min-height: 450px;
    overflow: hidden;
    position: relative;
}

.phone-notch {
    width: 120px;
    height: 24px;
    background: #111;
    border-radius: 0 0 14px 14px;
    margin: 0 auto;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links > li > a {
        padding: 14px 20px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: rgba(0,0,0,0.15);
    }

    .dropdown-menu a {
        color: rgba(255,255,255,0.8);
        border-bottom-color: rgba(255,255,255,0.1);
        padding-left: 40px;
    }

    .dropdown-menu a:hover {
        background: rgba(255,255,255,0.05);
        color: #fff;
        padding-left: 46px;
    }

    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 0.95rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .page-header h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
}
