:root {
    --primary-color: #003380;
    /* ISMA Blue - Updated to Dark Elegant Blue */
    --primary-dark: #002255;
    --secondary-color: #e63946;
    /* CTA Red */
    --secondary-dark: #c1121f;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --light-bg: #f3f4f6;
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-heading: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    /* New font for highlights */
    --font-body: 'Roboto', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

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

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 90px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 70px;
    width: auto;
}

.logo-text .logo-title {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-contact {
    background-color: var(--secondary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
}

.btn-contact:hover {
    background-color: var(--secondary-dark);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

.btn-contact::after {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1001;
    transition: var(--transition);
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.close-menu {
    text-align: right;
    font-size: 1.5rem;
    margin-bottom: 30px;
    cursor: pointer;
    color: var(--text-dark);
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

/* Hero Section - Redesign */
#hero {
    min-height: 85vh;
    /* Taller hero */
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    /* Dark text on light bg */
    margin-top: 90px;
    background-color: #f8faff;
    /* Very light blue-ish grey */
    overflow: hidden;
    padding: 40px 0;
}

/* Remove old hero backgrounds */
.hero-background,
.hero-overlay {
    display: none;
}

.hero-container-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
}

#hero h1 {
    font-size: 2.8rem;
    line-height: 1.25;
    margin-bottom: 25px;
    color: var(--primary-dark);
    text-shadow: none;
    /* Clean look */
    font-weight: 700;
}

/* Highlight Text Style */
.highlight-font {
    color: var(--secondary-color);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.6;
}

.hero-value-prop {
    font-size: 1.1rem;
    margin-bottom: 35px;
    color: var(--text-dark);
    line-height: 1.6;
}

.highlight-years {
    color: var(--secondary-color);
    font-weight: 800;
    font-size: 1.1em;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Hero Image Section */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-image-crop {
    position: relative;
    width: 100%;
    max-width: 550px;
    height: 500px;
    border-radius: 40px 40px 40px 180px;
    /* Distinctive Curve */
    overflow: hidden;
    background-color: #fff;
    box-shadow: 20px 20px 0px rgba(0, 51, 128, 0.1);
    /* Stylized shadow offset */
}

.hero-img-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease, opacity 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-image-crop:hover .hero-img-main {
    transform: scale(1.05);
}

/* Floating Badge */
.floating-badge {
    position: absolute;
    bottom: 40px;
    left: -20px;
    background-color: var(--white);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-dark);
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.floating-badge i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Hero */
@media (max-width: 992px) {
    .hero-container-split {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-wrapper {
        justify-content: center;
    }

    .hero-image-crop {
        height: 400px;
        border-radius: 30px;
        /* Simplifies on tablet */
    }

    .floating-badge {
        left: 20px;
        /* Adjust position */
    }
}

@media (max-width: 768px) {
    #hero {
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 60px;
    }

    #hero h1 {
        font-size: 2rem;
    }

    .hero-image-crop {
        height: 300px;
        border-radius: 20px 20px 20px 60px;
    }
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.underline {
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto 15px;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--secondary-color);
}

.service-img {
    height: 200px;
    background-color: #eee;
    /* Fallback */
    background-size: cover;
    background-position: center;
}

.service-content {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-top: -60px;
    /* Pull up to overlap image */
    margin-bottom: 20px;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.btn-text {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-text:hover {
    gap: 12px;
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    #hero h1 {
        font-size: 2.2rem;
    }

    #hero p {
        font-size: 1.1rem;
    }

    .logo-text h1 {
        font-size: 0.7rem;
    }
}

/* About Section */
.bg-light {
    background-color: var(--light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.lead-text {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
    padding-left: 15px;
}

.history-box {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin: 30px 0;
    border-left: 5px solid var(--primary-color);
}

.history-box h4 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.values-list h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.values-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.values-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.values-list li i {
    color: var(--secondary-color);
}

.about-image {
    min-height: 400px;
    background-image: url('Public/IMAGES/hero-bg.png');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    position: relative;
    box-shadow: var(--shadow-md);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

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

.team-photo {
    height: 250px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 4rem;
}

.team-info {
    padding: 20px;
}

.team-info h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.team-info .role {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.team-info p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Coverage Section */
.coverage-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .coverage-container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.coverage-text h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2.2rem;
}

.coverage-text p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.coverage-list h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.filter-container {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-container {
        padding: 15px;
    }
}

.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.brands-wrapper {
    overflow: hidden;
    background: var(--white);
    padding: 10px 0;
    width: 100%;
}

.brands-slider {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.brands-slider:hover {
    animation-play-state: paused;
}

.brand-slide {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 40px;
    /* Gap between the two big sets if needed, or just internal padding */
    gap: 60px;
    /* Space between individual logos */
}

.brand-slide img {
    height: 80px;
    width: auto;
    /* Preserve aspect ratio */
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
    display: block;
}



.brand-slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Client Section specific - Full Color & Strict Size Uniformity */
#clients .brand-slide img {
    filter: none;
    opacity: 1;
    width: 180px;
    /* Fixed width container */
    height: 90px;
    /* Fixed height container */
    object-fit: contain;
    /* Center and scale without distortion */
    /* Remove previous max constraints as we set fixed size */
    max-width: none;
    max-height: none;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-container {
    position: relative;
    height: 300px;
}

.comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.comparison-label.after {
    left: auto;
    right: 15px;
    background-color: var(--secondary-color);
}

.project-info {
    padding: 20px;
    text-align: center;
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.blog-img {
    height: 200px;
    background-color: #ddd;
    /* Placeholder or gradient */
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.blog-content {
    padding: 20px;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

.blog-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.blog-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--secondary-color);
}

.stars {
    color: #ffd700;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.client-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.client-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-col p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

/* Map Specific Styles */
#map {
    height: 100%;
    width: 100%;
    border-radius: 10px;
    z-index: 1;
}

/* Timeline Section */
.timeline-section-wrapper {
    position: relative;
    padding: 40px 0;
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-bottom: 20px;
    padding: 0 20px;
    gap: 20px;
    /* Add gap between items */
}

/* Horizontal Line - Adjusted to run behind the cards or top */
.timeline-line {
    display: none;
    /* Removing the line as the user asked for a simpler look "solo deja estos textos" and usually focusing on the cards */
}

.timeline-item {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 25%;
    padding: 0;
}

.timeline-img-box {
    width: 100%;
    height: 200px;
    /* Rectangular/Square height */
    border-radius: 10px;
    /* Rounded square */
    background-color: var(--white);
    border: none;
    /* Remove border */
    margin: 0 auto 15px;
    /* Spacing between image and text */
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.timeline-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-img-box:hover {
    transform: translateY(-5px);
    /* Lift up effect instead of scale */
}

.timeline-content {
    background-color: var(--white);
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-weight: 700;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Specific Image Adjustments */
/* Founder - Fix cropping to show face */
.timeline-item:nth-child(1) .timeline-img-box img {
    object-position: top center;
}

/* Map - Show full map */
.timeline-item:nth-child(3) .timeline-img-box img {
    object-fit: contain;
    padding: 10px;
    /* Internal spacing */
    background-color: var(--white);
}

/* Timeline Flow Arrows (Desktop) */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -20px;
    /* Position in the gap */
    top: 100px;
    /* Center of the 200px image */
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 15px solid var(--secondary-color);
    z-index: 10;
}

/* Banner */
.timeline-banner {
    background-color: #e3f2fd;
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: var(--primary-dark);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .timeline-line {
        width: 4px;
        height: 100%;
        left: 50%;
        top: 0;
        right: auto;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 100%;
        max-width: 350px;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Add vertical flow for mobile */
        margin-bottom: 40px;
    }

    /* Vertical Arrow for Mobile */
    .timeline-item:not(:last-child)::after {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -30px;
        transform: translateX(-50%) rotate(90deg);
        border-left-color: var(--secondary-color);
    }

    .timeline-img-box {
        height: 250px;
        /* Taller on mobile for visibility */
    }
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    min-width: 240px;
    z-index: 1000;
    border-top: 3px solid var(--secondary-color);
    padding: 10px 0;
    border-radius: 0 0 5px 5px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    display: block;
}

.dropdown-menu a {
    padding: 12px 20px;
    display: block;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: var(--transition);
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f9fafb;
    color: var(--primary-color);
    padding-left: 25px;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
}

/* Homepage Brief Timeline (Horizontal) */
.timeline-summary {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px 0;
}

.timeline-summary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: 0;
}

.timeline-milestones {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.milestone {
    text-align: center;
    background: var(--light-bg);
    padding: 0 10px;
    flex: 1;
    max-width: 200px;
}

.milestone-marker {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 4px solid var(--white);
    box-shadow: 0 0 0 4px #e5e7eb;
    font-size: 1.2rem;
    transition: var(--transition);
}

.milestone:hover .milestone-marker {
    background: var(--primary-color);
    transform: scale(1.1);
}

.milestone-date {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: block;
}

.milestone-title {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

.milestone-img-mini {
    width: 40px;
    /* Restrict image size inside marker */
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* Timeline Mobile */
@media (max-width: 768px) {
    .timeline-summary::before {
        width: 4px;
        height: 100%;
        left: 20px;
        top: 0;
        transform: none;
    }

    .timeline-milestones {
        flex-direction: column;
        gap: 30px;
    }

    .milestone {
        display: flex;
        align-items: flex-start;
        text-align: left;
        padding-left: 0;
        margin-left: 0;
        max-width: 100%;
    }

    .milestone-marker {
        margin: 0 20px 0 0;
        flex-shrink: 0;
    }

    .milestone-content {
        padding-top: 10px;
    }
}

/* Specific Pages Styles */
/* Mision Vision */
.mv-page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 768px) {
    .mv-page-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.mv-section-block {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--secondary-color);
    height: 100%;
}

.mv-section-block h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mv-section-block p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
}

/* Historia Vertical Detailed */
.history-full-timeline {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
}

.history-full-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 4px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    border-radius: 2px;
}

.history-node {
    padding: 20px 40px;
    position: relative;
    background-color: transparent;
    width: 50%;
    box-sizing: border-box;
}

.history-node.left {
    left: 0;
    text-align: right;
}

.history-node.right {
    left: 50%;
    text-align: left;
}

.history-node::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 30px;
    background-color: var(--secondary-color);
    border: 5px solid var(--white);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.history-node.left::after {
    right: -12px;
}

.history-node.right::after {
    left: -12px;
}

.history-content-card {
    padding: 30px;
    background-color: var(--white);
    position: relative;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.history-content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.history-year {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.history-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    position: relative;
}

.history-img-large {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .history-full-timeline::before {
        left: 30px;
    }

    .history-node {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .history-node.left {
        text-align: left;
    }

    .history-node.left,
    .history-node.right {
        left: 0;
    }

    .history-node.left::after,
    .history-node.right::after {
        left: 18px;
    }

    .history-year {
        right: 20px;
        left: auto;
    }
}

/* Team Grid Full */
.team-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.team-profile-card {
    background: var(--white);
    /* Professional White Card */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.team-profile-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    /* Removed background change to keep white */
}

.team-profile-img {
    height: 350px;
    /* Taller for mid-shot portraits */
    background: transparent;
    /* Seamless integration */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    /* Align image to bottom */
    justify-content: center;
    padding-top: 20px;
}

.team-profile-img img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom center;
    transition: transform 0.5s ease;
}

/* Icon placeholders for cards without photos */
.team-profile-img i {
    color: rgba(255, 255, 255, 0.3);
    /* Subtle white icon */
    font-size: 8rem !important;
    margin-bottom: 40px;
}

.team-profile-card:hover .team-profile-img img {
    transform: scale(1.05);
}

.team-profile-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.team-profile-body h3 {
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.team-profile-body .role {
    color: var(--secondary-color);
    /* Red for role to pop */
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
}

.team-profile-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- New Timeline Layout (Grid/Flex) --- */
.history-timeline-container {
    position: relative;
    max-width: 1100px;
    margin: 60px auto;
    padding: 20px 0;
}

/* Central Line */
.history-timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 80px;
    position: relative;
    width: 100%;
}

.history-col {
    width: 45%;
    /* Leaves 10% for center gap */
    position: relative;
}

/* Image Styling */
.history-img-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 5px solid var(--white);
    max-height: 300px;
    /* Limit height */
}

.history-img-wrapper:hover {
    transform: scale(1.02);
}

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

/* Text Content Styling */
.history-text-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.history-text-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    transition: var(--transition);
}

/* Arrows pointing to center */
.history-text-content::before {
    content: '';
    position: absolute;
    top: 30px;
    border-style: solid;
    border-width: 10px;
    z-index: 1;
}

/* Arrow for Right Side Content (pointing left) */
.history-col.right-side .history-text-content::before {
    left: -20px;
    border-color: transparent var(--white) transparent transparent;
}

/* Arrow for Left Side Content (pointing right) */
.history-col.left-side .history-text-content::before {
    right: -20px;
    border-color: transparent transparent transparent var(--white);
}

/* Year Styling */
.h-year {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Title Styling */
.h-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

/* Text Styling */
.h-desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Center Dot */
.history-center-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-color: var(--secondary-color);
    /* Red dot */
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary-color);
    /* Blue ring */
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .history-timeline-container::before {
        left: 30px;
    }

    .history-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 50px;
    }

    .history-col {
        width: 100%;
        padding-left: 60px;
        /* Space for line */
        margin-bottom: 20px;
    }

    .history-center-dot {
        left: 30px;
        top: 0;
        transform: translate(-50%, 0);
        margin-top: 20px;
    }

    /* Hide arrows on mobile */
    .history-text-content::before {
        display: none;
    }
}

.team-category-title {
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: left;
    border-left: 5px solid var(--secondary-color);
    padding-left: 15px;
    font-size: 1.5rem;
    margin-top: 40px;
}

/* --- Team Flip Card Design --- */
.team-flip-card {
    background-color: transparent;
    width: 100%;
    max-width: 350px;
    /* Slightly wider cards */
    margin: 0 auto 30px;
    /* Center in grid */
    height: 480px;
    /* Fixed height needed for flip effect, increased slightly */
    perspective: 1000px;
    /* 3D effect */
}

.team-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Smooth pop effect */
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.team-flip-card:hover .team-flip-card-inner {
    transform: rotateY(180deg);
}

.team-flip-front,
.team-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: var(--white);
    border: 3px solid var(--primary-color);
    /* Strong Blue Border */
    box-shadow: var(--shadow-sm);
}

/* --- Front Styles --- */
.team-flip-front {
    z-index: 2;
}

/* 1. Top: Role (Puesto) */
.flip-role {
    order: 1;
    background-color: transparent;
    color: var(--primary-dark);
    padding: 0;
    border-radius: 0;
    font-size: 1.2rem;
    /* Almost as big as name, slightly smaller to fit logic but user asked equal. Let's go big. */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.2;
}

/* 2. Center: Image (Circle) */
.flip-img-wrapper {
    order: 2;
    width: 240px;
    /* Larger image */
    height: 240px;
    border-radius: 50%;
    /* Circle again */
    background-color: #f8fafc;
    /* Light background for transparent images */
    border: 8px solid var(--white);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(230, 57, 70, 0.1);
    /* Floating shadow + Subtle Red Ring */
    margin-bottom: 25px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Anchor bottom for cutouts */
}

/* Specific styling for the images provided */
.flip-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the circle */
    object-position: top center;
    /* Show head and shoulders/forearms */
    /* Focus on face */
    transition: transform 0.6s ease;
}

/* Icon fallback styling */
.flip-img-wrapper i {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 0;
    align-self: center;
}

.team-flip-card:hover .flip-img-wrapper img {
    transform: scale(1.15);
}

/* 3. Bottom: Name */
.flip-name {
    order: 3;
    font-size: 1.4rem;
    /* Balancing size since role is also big now */
    color: var(--primary-dark);
    font-weight: 800;
    /* Negrita */
    margin: 0;
    line-height: 1.2;
}

/* --- Back Styles --- */
.team-flip-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    text-align: center;
}

.team-flip-back p {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.team-flip-back::before {
    content: '\f10d';
    /* FontAwesome quote icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: block;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-flip-card {
        height: 480px;
        /* More height for mobile text wrapping */
    }
}

/* Blog Hero Headers */
.blog-hero-header {
    background-color: #002B50;
    /* Strong Deep Blue */
    color: white;
    padding: 180px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero-header.with-bg {
    background-image: linear-gradient(rgba(0, 43, 80, 0.85), rgba(0, 43, 80, 0.9)), url('Public/blog_header_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.blog-hero-header h2,
.blog-hero-header h1 {
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
}

.blog-hero-header .underline {
    background-color: var(--secondary-color);
    width: 60px;
    height: 3px;
    margin: 0 auto 20px;
}

.blog-hero-header p {
    color: #cbd5e1;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.blog-meta-header {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.blog-meta-header i {
    margin-right: 5px;
    color: var(--secondary-color);
}

/* Adjust blog detail container to account for the header moving out */
.blog-detail-container {
    padding-top: 60px !important;
}

/* Project Slider Styles */
.sliders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}

.slider-container-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.slider-title {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.slider-box {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    background-color: #f0f0f0;
}

.project-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.project-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Link to full project styling */
.view-project-link {
    text-align: center;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .sliders-grid {
        grid-template-columns: 1fr;
    }

    .slider-box {
        height: 300px;
    }
}

/* =========================================
   Circular Team Carousel Styles
   ========================================= */

.ct-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
    overflow: hidden;
    /* Prevent scrollbar during transitions */
}

.ct-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 900px) {
    .ct-grid {
        grid-template-columns: 1.2fr 1fr;
        /* More space for images */
        gap: 4rem;
    }
}

.ct-image-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ct-image-card {
    position: absolute;
    width: 280px;
    /* Fixed width for consistency */
    height: 380px;
    object-fit: contain;
    /* Changed to contain to avoid zooming faces too much */
    object-position: center;
    /* Center vertically to equalize top and bottom space */
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    /* Transitions for the 3D effect */
    transition: all 0.8s cubic-bezier(0.4, 2, 0.3, 1);
    transform-style: preserve-3d;
    background-color: white;
    will-change: transform, opacity;
    padding-top: 0;
}

.ct-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 20px;
    z-index: 10;
}

.ct-name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ct-name.active {
    opacity: 1;
    transform: translateY(0);
}

.ct-role {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.ct-role.active {
    opacity: 1;
    transform: translateY(0);
}

.ct-quote {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    min-height: 120px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.ct-quote.active {
    opacity: 1;
    transform: translateY(0);
}

/* Arrow Buttons */
.ct-arrows {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.ct-arrow-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--primary-dark);
    color: var(--white);
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ct-arrow-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.ct-arrow-btn:active {
    transform: translateY(-1px);
}