@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
    --primary-blue: #002f6c;
    --dark-blue: #011b40;
    --bright-blue: #0253b8;
    --accent-red: #d32f2f;
    --bright-red: #e63946;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #5a6673;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll with animations */
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* NAVBAR */
.navbar {
    background-color: var(--primary-blue) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
    z-index: 1030;
}

.navbar-brand img {
    border-radius: 4px;
    /* Soften the logo edges slightly if needed */
}

.navbar-nav .nav-item {
    margin: 0 5px;
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    padding: 8px 15px !important;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.navbar-nav .nav-link:hover {
    color: var(--white) !important;
    opacity: 0.9;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: var(--bright-red);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after {
    transform: scaleX(1);
}

/* Invert nav icons color to make them visible on dark blue */
.navbar-nav img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 6px 10px;
}

.navbar-toggler-icon {
    /* Ensures the hamburger icon is visible */
}

/* HERO SECTION */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 140px 20px 120px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('img/c4.jpg');
    /* Background image representing projects */
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    /* Darkened for readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--white);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #e2e8f0;
    margin-bottom: 45px;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-hero {
    background-color: var(--accent-red);
    color: var(--white);
    padding: 14px 40px;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--accent-red);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
    display: inline-block;
    letter-spacing: 0.5px;
}

.btn-hero:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

/* TITLES & CONTAINERS */
.titulo-container {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    padding-top: 2rem;
}

.titulo {
    font-size: 2.2rem;
    color: var(--primary-blue);
    font-weight: 800;
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
    margin: 0;
}

.titulo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background-color: var(--accent-red);
    border-radius: 4px;
}

.subtitulo {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 3rem;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* CARDS RE-DESIGN */
.card {
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.card-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes content down if needed */
}

/* Image inside Card */
.card-img-top {
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid var(--accent-red);
    /* Color touch */
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* TIMELINE CUSTOM CARDS (Reseña histórica) */
.timeline-card {
    margin-bottom: 20px;
}

.timeline-card .card {
    border-top: 4px solid var(--primary-blue);
}

.timeline-card:nth-child(2) .card {
    border-top: 4px solid var(--accent-red);
}

.timeline-card:nth-child(3) .card {
    border-top: 4px solid var(--bright-blue);
}

/* LIST GROUPS (Valores) */
.list-group-item {
    border: none;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-left: 30px;
}

/* Add custom bullet to list */
.list-group-item::before {
    content: '→';
    position: absolute;
    left: 8px;
    color: var(--accent-red);
    font-weight: bold;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* CAROUSEL CONTROLS */
.carousel {
    padding-bottom: 40px;
    /* Space for controls */
}

/* Ralentizar la animación de transición al cambiar de tarjeta */
#carouselExample .carousel-item {
    transition: transform 1.2s ease-in-out;
}

.carousel-control-prev,
.carousel-control-next {
    width: 45px;
    height: 45px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    top: 40%;
    transform: translateY(-50%);
    opacity: 0.9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.carousel-control-prev {
    left: -15px;
}

.carousel-control-next {
    right: -15px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: var(--accent-red);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 25px;
    height: 25px;
}

/* IMAGES & MEDIA */
.img-wrapper {
    overflow: hidden;
    border-radius: var(--border-radius);
}

.img-fluid {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    max-width: 100%;
    height: auto;
}

.img-fluid:hover {
    box-shadow: var(--box-shadow-hover);
}

/* SECTIONS STRUCTURE */
.section-padding {
    padding: 80px 0;
}

.bg-light-alt {
    background-color: #ffffff;
    /* Contrast against the main bg */
}

/* FOOTER */
.footer {
    background-color: var(--dark-blue) !important;
    padding: 70px 0 30px 0;
    margin-top: 60px;
    font-size: 0.9rem;
    border-top: 4px solid var(--accent-red);
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45px;
    height: 3px;
    background-color: var(--accent-red);
    border-radius: 2px;
}

.footer p,
.footer ul li {
    color: #a0aec0;
    margin-bottom: 12px;
    line-height: 1.6;
}

.footer strong {
    color: var(--white);
    font-weight: 600;
}

.footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--bright-red);
    text-decoration: none;
}

/* ANIMATION CLASSES (Intersection Observer) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Mobile responsive fixes */
@media (max-width: 991px) {
    .navbar-nav .nav-link {
        color: white !important;
    }

    .collapse.show {
        background-color: var(--dark-blue);
        padding: 15px;
        border-radius: 8px;
        margin-top: 10px;
    }

    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-section {
        padding: 100px 15px 80px;
    }

    .section-padding {
        padding: 50px 0;
    }

    .carousel-control-prev {
        left: 0px;
        top: 50%;
    }

    .carousel-control-next {
        right: 0px;
        top: 50%;
    }
}