/* =====================================================
   CIBERSEGURIDAD BUAP - Modern Styles
   Based on secre-base design system
   ===================================================== */

/* CSS Variables - Color Palette */
:root {
    /* Primary Colors */
    --primary-dark: #24262a;
    --primary-blue: #003B5C;
    --accent-blue: #00B5E2;
    --accent-light: #009ec0;

    /* Text Colors */
    --text-dark: #1a1a2e;
    --text-light: #6b7280;
    --text-white: #ffffff;

    /* Background Colors */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #24262a;

    /* Gradient Colors */
    --gradient-cyan: linear-gradient(90deg, #00c9f0, #00a8cc);
    --gradient-blue: linear-gradient(135deg, #04aeda, #039bc2);
    --gradient-green: linear-gradient(135deg, #aad400, #8fb800);
    --gradient-orange: linear-gradient(135deg, #ff8800, #e67a00);
    --gradient-teal: linear-gradient(135deg, rgba(0, 102, 87, 1), rgba(90, 133, 114, 1));

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-dark);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    color: var(--text-light);
    line-height: 1.7;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =====================================================
   TOP BAR
   ===================================================== */
.top-bar {
    background-color: var(--primary-dark);
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-left img {
    height: 28px;
    transition: transform var(--transition-fast);
}

.top-bar-left a:hover img {
    transform: scale(1.05);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar-links {
    display: flex;
    gap: 1.25rem;
}

.top-bar-links a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.top-bar-links a:hover {
    color: var(--text-white);
}

.top-bar-links a i {
    font-size: 1rem;
}

.top-bar-social {
    display: flex;
    gap: 0.5rem;
}

.top-bar-social a img {
    height: 22px;
    width: 22px;
    opacity: 0.85;
    transition: all var(--transition-fast);
}

.top-bar-social a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background-color: var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-cyan);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-logo img {
    height: 50px;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-fast);
}

.navbar-logo:hover img {
    transform: scale(1.02);
}

.navbar-title {
    color: var(--text-white);
}

.navbar-title h1 {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-white);
    margin-bottom: 0.15rem;
}

.navbar-title h2 {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.navbar-menu li a {
    display: block;
    color: var(--text-white);
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.navbar-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Navbar Toggle (Mobile) */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-white);
    border-radius: 2px;
    transition: all var(--transition-normal);
    transform-origin: center;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-white);
    z-index: 1100;
    transition: transform var(--transition-normal);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
    transform: translateX(280px);
}

.mobile-menu-header {
    background-color: var(--primary-blue);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h3 {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 500;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: transform var(--transition-fast);
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

.mobile-menu-nav {
    list-style: none;
    padding: 1rem 0;
}

.mobile-menu-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    border-bottom: 1px solid var(--bg-light);
    transition: all var(--transition-fast);
}

.mobile-menu-nav li a:hover,
.mobile-menu-nav li a.active {
    background-color: var(--bg-light);
    color: var(--primary-blue);
    padding-left: 2rem;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    position: relative;
    min-height: 500px;
    height: 70vh;
    max-height: 900px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 59, 92, 0.7), rgba(0, 181, 226, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--text-white);
    padding: 2.5rem !important;
    margin-left: 3.2rem;
    margin-right: 2rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-content h1 {
    color: var(--text-white);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.carousel-dot.active,
.carousel-dot:hover {
    background-color: var(--text-white);
    transform: scale(1.2);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev { left: 1.5rem; }
.carousel-arrow.next { right: 4.5rem; } /* Shifted left to avoid social icons */

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    flex: 1;
    padding: 0;
}

/* Section Base */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-cyan);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* =====================================================
   CARDS
   ===================================================== */

/* Service Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue);
}

.service-card-banner {
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
    display: block;
}

.service-card-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

.service-card-banner img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-banner img {
    transform: scale(1.1);
}

.service-card-content {
    padding: 1.5rem;
}

.service-card-content h3 {
    color: var(--primary-blue);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.service-card-content p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.service-card-link:hover {
    gap: 0.75rem;
    color: var(--accent-light);
}

.service-card-link i {
    transition: transform var(--transition-fast);
}

.service-card-link:hover i {
    transform: translateX(3px);
}

/* Quick Link Cards */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.quick-link-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    text-decoration: none;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.quick-link-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-link-icon i {
    font-size: 1.5rem;
    color: var(--text-white);
}

.quick-link-icon.blue { background: var(--gradient-blue); }
.quick-link-icon.green { background: var(--gradient-green); }
.quick-link-icon.orange { background: var(--gradient-orange); }
.quick-link-icon.teal { background: var(--gradient-teal); }

.quick-link-text h4 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quick-link-text p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
}

/* Info Card / Content Card */
.content-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.content-card h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-light);
}

.content-card p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

.content-card p:last-child {
    margin-bottom: 0;
}

/* Sidebar Card */
.sidebar-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.sidebar-card:last-child {
    margin-bottom: 0;
}

.sidebar-card h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.sidebar-card p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.sidebar-card p:last-child {
    margin-bottom: 0;
}

.sidebar-card strong {
    color: var(--text-dark);
}

/* Event Cards */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.event-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.event-card-image {
    height: 220px;
    background: var(--bg-light);
    display: block;
    overflow: hidden;
}

.event-card-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-card-image img {
    transform: scale(1.1);
}

.event-card-content {
    padding: 1.75rem;
}

.event-card-content h3 {
    color: var(--primary-blue);
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.event-card-date {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-card-date i {
    font-size: 1rem;
}

.event-card-content p {
    margin-bottom: 1.5rem;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-blue);
    color: var(--text-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(4, 174, 218, 0.4);
    color: var(--text-white);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-outline:hover {
    background: var(--text-white);
    color: var(--primary-blue);
}

/* =====================================================
   SOCIAL BAR (Floating)
   ===================================================== */
.social-float {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 900;
}

.social-float a {
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.social-float a:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-lg);
}

.social-float a.facebook:hover { background: #3b5998; }
.social-float a.instagram:hover { background: #e4405f; }
.social-float a.twitter:hover { background: #1da1f2; }
.social-float a.telegram:hover { background: #0088cc; }

/* =====================================================
   FACEBOOK WIDGET
   ===================================================== */
.facebook-widget {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.facebook-widget-header {
    background: var(--primary-dark);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.facebook-widget-header i {
    color: #1877f2;
    font-size: 1.25rem;
}

.facebook-widget-header span {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
}

.facebook-widget iframe {
    width: 100%;
    height: 450px;
    border: none;
}

/* =====================================================
   PAGE LAYOUTS
   ===================================================== */

/* Two Column Layout */
.page-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.page-main {
    min-width: 0;
}

.page-sidebar {
    position: sticky;
    top: 100px;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-blue);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Contact Page */
.contact-info-item {
    margin-bottom: 1.25rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item h4 {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.contact-info-item p {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.social-links-list {
    list-style: none;
}

.social-links-list li {
    margin-bottom: 1rem;
}

.social-links-list li:last-child {
    margin-bottom: 0;
}

.social-links-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.social-links-list a:hover {
    color: var(--accent-blue);
    transform: translateX(5px);
}

.social-links-list i {
    width: 24px;
    font-size: 1.1rem;
    color: var(--accent-blue);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-cyan);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-info h4 {
    color: var(--accent-blue);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Motion System */
[data-motion] {
    opacity: 0;
    transform: translateY(20px);
}

[data-motion="fade-up"].visible {
    animation: fadeUp 0.6s ease forwards;
}

[data-motion="fade-in"].visible {
    animation: fadeIn 0.6s ease forwards;
}

[data-motion="scale-in"].visible {
    animation: scaleIn 0.5s ease forwards;
}

[data-motion="slide-left"].visible {
    animation: slideInLeft 0.6s ease forwards;
}

/* Stagger Delays */
[data-motion-delay="1"] { animation-delay: 0.1s; }
[data-motion-delay="2"] { animation-delay: 0.2s; }
[data-motion-delay="3"] { animation-delay: 0.3s; }
[data-motion-delay="4"] { animation-delay: 0.4s; }
[data-motion-delay="5"] { animation-delay: 0.5s; }
[data-motion-delay="6"] { animation-delay: 0.6s; }

/* =====================================================
   UTILITIES
   ===================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-accent { color: var(--accent-blue); }
.text-primary { color: var(--primary-blue); }

.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1024px) {
    .page-grid {
        grid-template-columns: 1fr;
    }

    .page-sidebar {
        position: static;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    .top-bar-links {
        display: none;
    }

    .social-float {
        right: 1rem;
        gap: 0.5rem;
    }

    .social-float a {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .content-card {
        padding: 1.75rem;
    }

    .hero {
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .carousel-arrow {
        display: none;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-section {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-title h1 {
        font-size: 0.95rem;
    }

    .navbar-title h2 {
        font-size: 0.75rem;
    }

    .navbar-logo img {
        height: 42px;
    }

    .top-bar-social a img {
        height: 20px;
        width: 20px;
    }

    .section {
        padding: 2.5rem 0;
    }

    .service-card-content,
    .sidebar-card {
        padding: 1.25rem;
    }

    .btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }

    .social-float {
        bottom: 1rem;
        top: auto;
        transform: none;
        flex-direction: row;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .social-float a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* =====================================================
   HERO CAROUSEL (Multi-image)
   ===================================================== */
.hero-carousel {
    position: relative;
    min-height: 450px;
    overflow: hidden;
    background: #004b77;
}

.hero-carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-carousel-slides .carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-carousel-slides .carousel-img.active {
    opacity: 1;
}

.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 15;
    background: rgba(0, 0, 0, 0.55);
    padding: 2.5rem 3rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    max-width: 90%;
    width: 700px;
}

.hero-text-overlay h2 {
    color: var(--text-white);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.hero-text-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.carousel-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-arrow.prev { left: 1.5rem; }
.carousel-nav-arrow.next { right: 1.5rem; }

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.carousel-dots .dot.active,
.carousel-dots .dot:hover {
    background: var(--text-white);
    transform: scale(1.2);
}

/* =====================================================
   WELCOME SECTION
   ===================================================== */
.welcome-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.welcome-content {
    padding: 2.5rem;
}

.welcome-content h1 {
    color: var(--primary-blue);
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.welcome-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 1.5rem;
}

.featured-image {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 1rem;
}

/* Faculty Card */
.faculty-card {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 2.5rem 2.5rem;
    gap: 1.5rem;
    align-items: center;
    transition: all var(--transition-normal);
}

.faculty-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.faculty-card-image {
    width: 100px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.faculty-card-content h3 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.faculty-card-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-align: left;
}

/* =====================================================
   NEWS SECTION (Sidebar)
   ===================================================== */
.news-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.news-section-title {
    color: var(--primary-blue);
    font-size: 1.35rem;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-light);
}

.news-card {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-light);
}

.news-card:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    transition: transform var(--transition-normal);
}

.news-card:hover .news-card-image {
    transform: scale(1.02);
}

.news-card-content h4 {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.news-card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.news-card-link {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.news-card-link:hover {
    color: var(--accent-light);
    gap: 0.6rem;
}

/* =====================================================
   CALENDARIOS SECTION
   ===================================================== */
.calendarios-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f4f8 100%);
    padding: 4rem 0;
}

.calendarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.calendario-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.calendario-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.calendario-card a {
    display: block;
    text-decoration: none;
}

.calendario-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.calendario-card:hover img {
    transform: scale(1.05);
}

.calendario-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: var(--text-white);
    padding: 2rem 1.25rem 1.25rem;
    transform: translateY(10px);
    transition: transform var(--transition-normal);
}

.calendario-card:hover .calendario-overlay {
    transform: translateY(0);
}

.calendario-overlay h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* =====================================================
   RESPONSIVE - Additional
   ===================================================== */
@media (max-width: 768px) {
    .hero-carousel {
        min-height: 350px;
    }

    .hero-text-overlay {
        padding: 1.5rem 2rem;
        width: 90%;
    }

    .hero-text-overlay h2 {
        font-size: 1.25rem;
    }

    .hero-text-overlay p {
        font-size: 0.95rem;
    }

    .carousel-nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .carousel-nav-arrow.prev { left: 0.75rem; }
    .carousel-nav-arrow.next { right: 0.75rem; }

    .welcome-content {
        padding: 1.75rem;
    }

    .faculty-card {
        flex-direction: column;
        text-align: center;
        margin: 1.5rem;
    }

    .faculty-card-content p {
        text-align: center;
    }

    .calendarios-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .calendario-card img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .hero-carousel {
        min-height: 300px;
    }

    .hero-text-overlay {
        padding: 1.25rem 1.5rem;
    }

    .hero-text-overlay h2 {
        font-size: 1.1rem;
    }

    .carousel-dots .dot {
        width: 10px;
        height: 10px;
    }

    .news-card-image {
        height: 120px;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .navbar,
    .social-float,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }

    .main-content {
        padding-top: 0;
    }

    .footer {
        background: none;
        color: #000;
    }
}
