/* ===========================
   RESET Y VARIABLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #901a22;
    --primary-dark: #6b1419;
    --secondary: #2c3e50;
    --accent: #25d366;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light: #f8f9fa;
    --white: #ffffff;
    --border: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

/* ===========================
   TOPBAR
   =========================== */
.topbar {
    background: linear-gradient(90deg, var(--primary-dark) 0%, #2e2e2e 100%);
    color: white;
    font-size: 0.9rem;
    padding: 0.7rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.topbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topbar-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.topbar-info span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.9;
}

.topbar-info i {
    color: var(--secondary);
}

.separator {
    opacity: 0.4;
}

.topbar-social {
    display: flex;
    gap: 1rem;
}

.topbar-social a {
    color: white;
    transition: all 0.3s ease;
}

.topbar-social a:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 8px 20px;
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    margin-left: 16px;
    transition: all 0.2s ease;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
}

/* ===========================
   EXPERIENCE BANNER
   =========================== */
.experience-banner {
    background: url('../img/portadacontacto.jpg') center center / cover no-repeat;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.experience-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

/* ===========================
   CONTACT SECTION - OPTIMIZADO
   =========================== */
.contact-section {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - 70px);
}

.contact-wrapper {
    max-width: 1150px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 350px 1fr;
    overflow: hidden;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   INFO PANEL - COMPACTO
   =========================== */
.contact-info-panel {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.contact-info-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.info-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.info-logo {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.info-logo i {
    font-size: 2.2rem;
    color: var(--primary);
}

.info-header h2 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.info-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.info-cards {
    position: relative;
    z-index: 1;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.card-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon i {
    font-size: 1.3rem;
}

.card-content h4 {
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.card-content p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
}

.social-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.social-footer h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* ===========================
   FORM PANEL - COMPACTO
   =========================== */
.contact-form-panel {
    padding: 2rem 2.5rem;
    position: relative;
}

.form-header {
    margin-bottom: 1.8rem;
}

.form-header h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.form-header p {
    color: var(--gray);
    font-size: 0.9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.form-group label i {
    color: var(--primary);
}

.required {
    color: #dc3545;
}

.optional {
    color: var(--gray);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(144, 26, 34, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--gray);
    text-align: right;
    margin-top: 0.2rem;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23901a22' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.checkbox-group {
    margin-top: 0.3rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--light);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.95rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(144, 26, 34, 0.3);
    margin-top: 0.8rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(144, 26, 34, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-footer-note {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-footer-note i {
    color: var(--accent);
}

/* ===========================
   SUCCESS MODAL - COMPACTO
   =========================== */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.success-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 380px;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
}

.modal-icon i {
    font-size: 2.5rem;
    color: white;
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.modal-content p {
    color: var(--gray);
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.modal-btn {
    background: var(--primary);
    color: white;
    padding: 0.65rem 1.75rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.modal-btn:hover {
    background: var(--primary-dark);
}

/* ===========================
   TRUSTED CLIENTS SECTION
   =========================== */
.trusted-clients {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.trusted-clients h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.trusted-clients h3::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    margin: 1rem auto;
    border-radius: 2px;
}

.clients-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.client-logo {
    padding: 1rem;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.6;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.client-logo img {
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--primary);
}

.footer .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer .social-links a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 5px;
    margin-top: 1rem;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* ===========================
   BACK TO TOP
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(144, 26, 34, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        max-width: 650px;
    }
    
    .contact-info-panel {
        padding: 2rem 1.8rem;
    }
    
    .contact-form-panel {
        padding: 2rem 2rem;
    }
}

@media (max-width: 768px) {
    .topbar-content {
        flex-direction: column;
        text-align: center;
        gap: 0.6rem;
    }

    .navbar-content {
        padding: 0 1.5rem;
        height: 60px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 4px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .btn-whatsapp {
        margin: 16px 0 0 0;
        justify-content: center;
    }

    .contact-section {
        padding: 2rem 1rem;
    }

    .experience-banner {
        height: 220px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-info-panel,
    .contact-form-panel {
        padding: 1.5rem 1.2rem;
    }
    
    .info-logo {
        width: 65px;
        height: 65px;
    }
    
    .info-logo i {
        font-size: 2rem;
    }
    
    .trusted-clients {
        padding: 3rem 1.5rem;
    }

    .trusted-clients h3 {
        font-size: 1.6rem;
    }

    .clients-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .client-logo {
        padding: 0.8rem;
    }

    .client-logo img {
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 1.5rem 0.8rem;
    }

    .experience-banner {
        height: 180px;
    }

    .contact-form-panel {
        padding: 1.5rem 1rem;
    }
    
    .info-logo {
        width: 60px;
        height: 60px;
    }
    
    .info-logo i {
        font-size: 1.8rem;
    }
    
    .form-header h2 {
        font-size: 1.4rem;
    }
    
    .submit-btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .trusted-clients {
        padding: 2rem 1rem;
    }

    .trusted-clients h3 {
        font-size: 1.4rem;
    }

    .clients-logos {
        gap: 0.8rem;
    }

    .client-logo {
        padding: 0.6rem;
    }

    .client-logo img {
        max-height: 45px;
    }
    .map-container {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
}
}