:root {
    --primary-color: #6C43BD;
    --secondary-color: #498061;
    --text-color: #333333;
    --bg-light: #F5F5F5;
    --white: #FFFFFF;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #5532a0;
    border-color: #5532a0;
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
    margin-right: 10px;
}

.btn-secondary:hover {
    background-color: #3a664d;
    border-color: #3a664d;
}

/* Header */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container .logo {
    height: 65px;
    /* Aumentado 25% aprox desde 50px */
    width: auto;
}

.header-buttons {
    display: flex;
    align-items: center;
}

.main-nav {
    margin-left: 80px;
    margin-right: 40px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background-color: #f9fafb;
    line-height: 1.25;
    transition: all 0.2s ease-in-out;
}

@media (min-width: 1025px) {
    .main-nav a {
        white-space: nowrap;
        min-height: 38px;
    }
}

@media (max-width: 1024px) {
    .main-nav a {
        white-space: normal;
        max-width: 120px;
        min-height: 48px;
        font-size: 0.85rem;
        padding: 4px 10px;
    }
}

.main-nav a:hover {
    color: #111111;
    border-color: #cbd5e1;
    background-color: #f3f4f6;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
}

/* Responsive Menu - Hidden by default */
.mobile-nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 99;
}

.mobile-nav-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-panel ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-panel a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
}

/* Persistent Mobile Buttons (hidden on desktop) */
.persistent-mobile-buttons {
    display: none;
    padding: 10px 5%;
    background-color: var(--white);
    border-top: 1px solid #eee;
    gap: 10px;
}

.persistent-mobile-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.95rem;
    margin: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: auto;
    min-height: 80vh;
    background-image: url('../assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(108, 67, 189, 0.8), rgba(73, 128, 97, 0.6));
    /* Branding gradients */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        padding: 8px 0;
    }

    .logo-container .logo {
        height: 48px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Morph hamburger to 'X' */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-buttons {
        display: none;
    }

    .persistent-mobile-buttons {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .hero-section {
        padding: 100px 0 60px 0;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .persistent-mobile-buttons {
        padding: 8px 3%;
        gap: 6px;
    }

    .persistent-mobile-buttons .btn {
        padding: 8px 6px;
        font-size: 0.85rem;
        border-radius: 4px;
    }
}

/* Sections General */
.section-padding {
    padding: 60px 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header .separator {
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin-bottom: 20px;
    border-radius: 2px;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.about-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border-top: 4px solid var(--secondary-color);
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    padding: 10px;
    border-radius: 50%;
    background-color: rgba(108, 67, 189, 0.1);
    width: 80px;
    height: 80px;
    line-height: 60px;
    /* Center emoji text vertically */
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Footer */
.main-footer {
    background-color: #2c2c2c;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #aaa;
}

/* Contact and Map Footer Overlay */
.contact-map-wrapper {
    grid-column: span 2;
    /* Ocupa el espacio de 2 columnas */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .contact-map-wrapper {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

.contact-left h3.mt-20 {
    margin-top: 30px;
}

.contact-right {
    position: relative;
    width: 100%;
    min-height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.map-preview {
    width: 100%;
    height: 100%;
}

.custom-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* Permite interactuar con el mapa aunque esté encima */
    background: var(--white);
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--primary-color);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

.custom-marker img {
    width: 40px;
    height: auto;
    display: block;
}

/* Global Responsive Adjustments for Mobile */
@media (max-width: 500px) {
    .section-header h2 {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}