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

:root {
    --primary-color: #163a79;
    --secondary-color: #1e4f9e;
    --accent-color: #dfa800;
    --light-bg: #F5F7FA;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --border-color: #DDDDDD;
    --success-color: #27AE60;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

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

/* ===== HEADER / NAVBAR ===== */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.26rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.btn-contacto {
    background-color: var(--accent-color);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-contacto:hover {
    background-color: #c49500;
}

/* ===== HERO SECTION ===== */
.hero {
    display: flex;
    align-items: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    min-height: 500px;
}

.hero .container {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    flex: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.placeholder-image {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 100px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== BOTONES ===== */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #c49500;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(223, 168, 0, 0.3);
}

.btn-secondary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #112d5e;
    transform: translateY(-2px);
}

/* ===== PARTNERS SECTION ===== */
.partners {
    background-color: var(--light-bg);
    padding: 60px 20px;
    text-align: center;
}

.partners h3 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.logos-slider {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos-track {
    display: flex;
    align-items: center;
    gap: 5rem;
    animation: scroll-logos 25s linear infinite;
    width: max-content;
}

.logo-item {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.logo-item img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s;
    mix-blend-mode: multiply;
}

.logo-item img.logo-larger {
    max-height: 120px;
    transform: scale(1.14);
}

.logo-item img.logo-porto {
    max-height: 120px;
    transform: scale(1.92);
}

.logo-item img.logo-mapfre {
    max-height: 120px;
    transform: scale(3.04);
}

.logo-item img.logo-sancristobal {
    max-height: 120px;
    transform: scale(1.9);
}

.logo-item img.logo-barbuss {
    max-height: 120px;
    transform: scale(1.15);
}

.logo-item.item-bse {
    width: 180px;
    margin: 0 -1.5rem;
}

.logo-item.item-near-bse {
    margin-right: -1.5rem;
}

.logo-item.item-sura {
    margin-left: 2rem;
}

.logo-item img.logo-bse {
    max-height: 42px;
}

.logo-item img:hover {
    opacity: 1;
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 80px 20px;
    background-color: white;
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 0;
}

.about-image {
    flex: 1;
    min-width: 0;
}

.about h2 {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.about h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--success-color);
    font-weight: bold;
    min-width: 30px;
}

.feature-item h4 {
    color: var(--text-dark);
    font-size: 1rem;
}

.about-image {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.about-img-wrapper {
    width: 33%;
    text-align: center;
}

.about-img-wrapper {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.about-img-name {
    margin-top: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.about-img {
    width: 100%;
    height: 350px;
    border-radius: 10px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.about-img-wrapper:hover .about-img {
    transform: scale(1.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-img-wrapper:hover {
    z-index: 10;
}

.about-img-wrapper:hover .about-img-name {
    position: relative;
    z-index: 11;
}

/* ===== SERVICES SECTION ===== */
.services {
    background-color: var(--light-bg);
    padding: 80px 20px;
}

.services h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

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

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(22, 58, 121, 0.15);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background-color: white;
    padding: 60px 20px;
}

.contact-layout {
    display: flex;
    gap: 3rem;
    align-items: stretch;
}

.contact-form-side {
    flex: 1;
    background-color: var(--primary-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(22, 58, 121, 0.2);
}

.contact-info-side {
    flex: 1;
    display: flex;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background-color: white;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(22, 58, 121, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.btn-form-submit {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-form-submit:hover {
    background-color: #c49500;
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    height: 100%;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background-color: var(--primary-color);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(22, 58, 121, 0.2);
    flex: 1;
}

.contact-ig-card {
    flex: 1;
}

.contact-info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: white;
}

.contact-info-item p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.2rem 0;
    word-break: break-all;
}

.contact-ig-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.3);
}

.contact-ig-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.4);
}

.contact-ig-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.contact-ig-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
}

/* ===== AGENT BANNER ===== */
.agent-banner {
    background: linear-gradient(rgba(22, 58, 121, 0.75), rgba(22, 58, 121, 0.75)), url('') center/cover no-repeat;
    background-color: var(--primary-color);
}

.agent-banner-overlay {
    padding: 60px 20px;
}

.agent-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-banner-text h3 {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
}

.agent-banner-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.btn-agent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-agent:hover {
    background-color: #c49500;
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background-color: #1a1a1a;
    color: white;
    padding: 3rem 20px 1rem;
}

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

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #cccccc;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 2rem;
    text-align: center;
    color: #999999;
}

/* ===== WHATSAPP WIDGET ===== */
.wa-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wa-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

.wa-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: waFadeIn 0.3s ease;
}

@keyframes waFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wa-popup-header {
    background-color: #075E54;
    color: white;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-header-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.wa-logo {
    flex-shrink: 0;
}

.wa-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wa-close:hover {
    opacity: 1;
}

.wa-popup-body {
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQYV2NkYPj/n4EBBBgZGRkYQIIgDlAELAHiMIIkwBxkCbAEAHfcCAV3YuMeAAAAAElFTkSuQmCC') repeat;
    background-color: #E5DDD5;
    padding: 1.5rem 1.2rem;
}

.wa-message {
    background-color: white;
    border-radius: 0 8px 8px 8px;
    padding: 0.8rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 85%;
}

.wa-sender {
    font-weight: 700;
    color: #075E54;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.wa-message p {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.wa-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.3rem;
}

.wa-open-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.wa-open-chat:hover {
    background-color: #1fb855;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .logo h1 {
        font-size: 0.91rem;
    }

    .logos-track {
        gap: 2rem;
    }

    .logo-item {
        width: 100px;
        height: 80px;
        padding: 0.5rem;
    }

    .logo-item img {
        max-height: 60px;
    }

    .hero {
        text-align: center;
    }

    .hero .container {
        flex-direction: column;
        gap: 2rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-content {
        display: none;
    }

    .hero-image {
        width: 100%;
    }

    .hero-logo {
        max-width: 250px;
    }

    .about-content {
        flex-direction: column;
    }

    .about-img {
        height: 180px;
        object-position: top center;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        flex-direction: column;
    }

    .agent-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .services h2 {
        font-size: 1.8rem;
    }

    .contact h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 0.5rem;
    }

    .nav-menu a.btn-contacto {
        padding: 0;
        background: none;
        border-radius: 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

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

    .chat-box {
        width: 100%;
        height: 100%;
        position: fixed;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}
