/* =========================================================================
   Avalúos y Consultoría Inmobiliaria - Luz Marina Rincón
   ========================================================================= */

/* --- Variables y Paleta de Colores --- */
:root {
    /* Colores corporativos basados en la tarjeta */
    --primary-blue: #1A365D;
    /* Azul oscuro (Asolonjas logo) */
    --secondary-blue: #2B6CB0;
    /* Azul medio */
    --accent-gold: #c5a059;
    /* Dorado/Bronce basado en la solicitud para el logo */
    --accent-gold-hover: #b08d4b;

    /* Neutros */
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;

    /* Efectos */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(26, 54, 93, 0.08);
    --shadow-lg: 0 10px 25px rgba(26, 54, 93, 0.15);

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
}

/* --- Reset y Tipografía --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-blue);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* --- Navegación --- */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    height: 80px;
    /* Aumentado de 60px a 80px */
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--accent-gold);
    transition: var(--transition-normal);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* --- Contenedor Principal (SPA) --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
    /* Restando header y footer */
    padding: 2rem;
    position: relative;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Estilos Globales Compartidos --- */
.glass-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.section-header span {
    color: var(--accent-gold);
}

.header-line {
    width: 60px;
    height: 4px;
    background-color: var(--accent-gold);
    margin: 0.5rem auto 1rem;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Botones */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(26, 54, 93, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-gold);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* --- Sección: Inicio --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    min-height: 70vh;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-title span {
    color: var(--primary-blue);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.floating-logo {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Sección: Nosotros --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    background: rgba(197, 160, 89, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.about-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-card p {
    color: var(--text-muted);
}

/* --- Sección: Servicios --- */
.services-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
}

.service-img-wrapper {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(26, 54, 93, 0.2);
    transform: rotate(45deg);
    transition: var(--transition-normal);
}

.service-icon {
    font-size: 2.5rem;
    color: white;
    transform: rotate(-45deg);
}

.service-item:hover .service-img-wrapper {
    transform: rotate(0deg);
}

.service-item:hover .service-icon {
    transform: rotate(0deg);
}

.service-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.service-info p {
    color: var(--text-muted);
}

/* --- Sección: Equipo --- */
.team-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
}

.team-profile {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-gold);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details h3 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.profile-details h3 span {
    color: var(--accent-gold);
}

.role {
    font-weight: 500;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.bio {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.contact-info-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.phone-link,
.email-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.phone-link:hover,
.email-link:hover {
    color: var(--accent-gold);
}

.certifications {
    text-align: center;
}

.certifications h4 {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.logos-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.cert-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: var(--transition-fast);
}

/* Fix for white logos on light background */
.invert-logo-light {
    filter: invert(1) hue-rotate(180deg) brightness(0.5);
    /* Invert white to dark blue/grey */
    transition: var(--transition-fast);
}

body.dark-mode .invert-logo-light {
    filter: none;
    /* Keep it white in dark mode */
}

.cert-logo:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.cert-logo i {
    font-size: 2.5rem;
}

.cert-address {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
}

/* --- Sección: Contacto --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.info-list {
    list-style: none;
    margin-top: 2rem;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    background: rgba(26, 54, 93, 0.05);
    color: var(--primary-blue);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text strong {
    display: block;
    color: var(--primary-blue);
    margin-bottom: 0.2rem;
}

.info-text span,
.info-text a {
    color: var(--text-muted);
}

.info-text a:hover,
.wpp-link-direct:hover {
    color: var(--accent-gold);
}

.wpp-link-direct {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: var(--transition-fast);
}

.modern-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-light);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition-normal);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
    background-color: var(--bg-white);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    min-height: 24px;
}

.status-success {
    color: #10B981;
}

.status-error {
    color: #EF4444;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Botón Flotante WhatsApp --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    color: white;
}

/* --- Menú Móvil --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .team-profile {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .contact-info-inline {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        /* Hidden */
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        /* Visible */
    }

    .nav-link {
        width: 100%;
        border-radius: 0;
        padding: 1rem 2rem;
        text-align: center;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        background-color: rgba(197, 160, 89, 0.1);
        border-left: 4px solid var(--accent-gold);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .main-content {
        padding: 1rem;
    }
}

/* --- Dark Mode Colors --- */
body.dark-mode {
    --bg-light: #0B1120;
    --bg-white: #1E293B;
    --text-dark: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --primary-blue: #60A5FA;
    --secondary-blue: #3B82F6;
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body.dark-mode .header {
    background-color: rgba(11, 17, 32, 0.95);
}

body.dark-mode .cert-address,
body.dark-mode .input-group input,
body.dark-mode .input-group textarea {
    background-color: #0F172A;
    color: var(--text-dark);
}

body.dark-mode .hero-title,
body.dark-mode .nav-link {
    color: var(--text-dark);
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    color: var(--primary-blue);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    body.dark-mode .nav-links {
        background-color: rgba(30, 41, 59, 0.98);
        /* var(--bg-white) con opacidad */
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    }
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Carrusel de Proyectos --- */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
    transition: var(--transition-fast);
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-fast);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* --- FAQ Accordion --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    padding: 0;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
    font-family: inherit;
}

.faq-question:hover {
    color: var(--accent-gold);
}

.faq-question i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-answer p {
    padding-bottom: 1.5rem;
    color: var(--text-muted);
}

/* --- Botón Volver Arriba --- */
.back-to-top {
    position: fixed;
    bottom: 100px;
    /* Above whatsapp */
    right: 30px;
    background-color: var(--primary-blue);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 0.8;
    visibility: visible;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-5px);
    background-color: var(--accent-gold);
}