@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-secondary: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --primary: #be123c; /* Elegant Crimson UCR Red */
    --primary-light: #e11d48;
    --accent: #2563eb;
    --border: rgba(15, 23, 42, 0.08); /* Soft thin border */
    --border-focus: rgba(185, 28, 28, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-premium: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
    --bg-main: #090d16;
    --bg-card: #111a2e;
    --bg-secondary: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    --primary: #f43f5e;
    --primary-light: #fb7185;
    --accent: #3b82f6;
    --border: rgba(248, 250, 252, 0.08);
    --border-focus: rgba(244, 63, 94, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-premium: 0 25px 50px -20px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(var(--bg-card) == #ffffff ? 255 : 17, var(--bg-card) == #ffffff ? 255 : 26, var(--bg-card) == #ffffff ? 255 : 46, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Let's write explicit transparency styles in body styles for better cross-theme support */
body.light-theme header {
    background-color: rgba(255, 255, 255, 0.85);
}
body.dark-theme header {
    background-color: rgba(17, 26, 46, 0.85);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--primary);
    background: rgba(185, 28, 28, 0.06);
    border: 1px solid var(--border-focus);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.logo-container:hover .logo-icon {
    background: var(--primary);
    color: white;
    transform: rotate(-5deg) scale(1.05);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.logo-text span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
    transition: var(--transition);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-secondary);
    color: var(--primary) !important;
}

.btn-back:active {
    transform: translateY(0);
}

/* --- Theme Switch --- */
.theme-switch {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 99px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.theme-switch:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

/* --- Hero Section --- */
.hero {
    padding: 100px 0 80px 0;
    background: radial-gradient(circle at 10% 20%, rgba(185, 28, 28, 0.04) 0%, transparent 45%), 
                radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 45%),
                var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.hero-tag {
    background: rgba(185, 28, 28, 0.08);
    color: var(--primary);
    border: 1px solid var(--border-focus);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 16px;
    border-radius: 99px;
    display: inline-block;
    margin-bottom: 24px;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 760px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

/* --- Main Layout --- */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 70px 0;
}

/* --- Pillars / Presentacion --- */
.pillars-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-align: center;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

.pillar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: transparent;
    transition: var(--transition);
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.pillar-card:hover::before {
    background-color: var(--primary);
}

.pillar-icon {
    font-size: 1.5rem;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition);
}

[data-theme="dark"] .pillar-icon {
    background: rgba(248, 250, 252, 0.03);
}

.pillar-card:hover .pillar-icon {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

.pillar-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.pillar-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- News / Article Section --- */
.article-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.article-header {
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
}

.article-kicker {
    display: inline-block;
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--accent);
    border: 1px solid rgba(37, 99, 235, 0.15);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 18px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-body {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 24px;
}

.article-body strong {
    color: var(--text-main);
    font-weight: 600;
}

.article-quote {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 28px 32px;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.article-quote-author {
    display: block;
    margin-top: 14px;
    font-weight: 600;
    font-style: normal;
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

/* --- Gallery inside Article --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 48px 0;
}

.gallery-item {
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    aspect-ratio: 4/3;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
    color: white;
    padding: 24px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.gallery-overlay span {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* --- Sidebar --- */
aside {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.sidebar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px 24px;
    box-shadow: var(--shadow-md);
}

.sidebar-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 550;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.sidebar-links a i {
    font-size: 0.95rem;
    color: var(--text-light);
    transition: var(--transition);
}

.sidebar-links a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.sidebar-links a:hover i {
    color: var(--primary);
}

.authority-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .authority-item {
    border-bottom-color: rgba(248, 250, 252, 0.04);
}

.authority-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.authority-avatar {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.authority-item:hover .authority-avatar {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

.authority-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.authority-info p {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

/* --- Footer --- */
footer {
    background-color: #060911;
    color: #cbd5e1;
    border-top: 1px solid var(--border);
    padding: 70px 0 40px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-about h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.footer-about p {
    color: #94a3b8;
    font-size: 0.92rem;
    max-width: 400px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: white;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.88rem;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid #111827;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #64748b;
}

/* --- Lightbox Modal --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 15, 0.96);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 85%;
    max-height: 75%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.lightbox-caption {
    color: #cbd5e1;
    margin-top: 24px;
    font-size: 0.95rem;
    text-align: center;
    max-width: 60%;
    font-weight: 400;
}

/* --- Responsive Adaptation --- */
@media (max-width: 980px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
