/* ========================================
   BEGA Designers – Estilos
   ======================================== */

/* Lógica mejorada para el Dropdown de Servicios */
.dropdown {
    position: relative;
    /* Creamos un área de contacto extendida hacia abajo */
    padding-bottom: 15px; 
    margin-bottom: -15px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    /* Ajustamos la posición para que "toque" el área extendida */
    top: calc(100% - 5px); 
    width: 16rem;
    background: var(--oscuro);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-elevated);
    z-index: 60;
    /* Eliminamos cualquier margen que cree separación */
    margin-top: 0; 
}

/* Aseguramos que el menú permanezca visible mientras el mouse esté en el área */
.dropdown:hover .dropdown-menu {
    display: block;
}

:root {
    --blanco: #ffffff;
    --arena: #b8af9e;
    --verde: #596851;
    --negro: #000000;
    --oscuro: #272322;
    --gris-trans: rgba(137, 137, 137, 0.5);

    --gradient-nav: linear-gradient(135deg, #000000, #272322);
    --gradient-hero: linear-gradient(180deg, rgba(0,0,0,0.7), rgba(39,35,34,0.8));
    --gradient-card: linear-gradient(145deg, #272322, #302b29);

    --shadow-card: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-elevated: 0 20px 60px rgba(0,0,0,0.4);

    --radius: 0.75rem;
    --font-title: "Ponomar", system-ui, serif;
    --font-body: "Quicksand", sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--arena);
    color: #000;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 400;
}

.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollCarousel {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes bounceScroll {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--gradient-nav);
    padding: 1rem 1.5rem;
    position: fixed; /* Cambiado de sticky a fixed para mejor control */
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.4s ease-in-out; /* Animación suave */
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

@media (min-width: 1024px) {
    .navbar { padding: 1rem 3rem; }
}

.nav-container {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo img{
    height: 3rem;
}

.logo-box {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid rgba(89, 104, 81, 0.3);
    background: rgba(89, 104, 81, 0.1);
}

.logo-letter {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blanco);
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--blanco);
    display: none;
}

@media (min-width: 640px) {
    .logo-text { display: block; }
}

.logo-accent {
    color: var(--verde);
}

/* Desktop Nav */
.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .nav-links { display: flex; }
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover {
    color: var(--blanco);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.chevron {
    transition: transform 0.2s;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(89,104,81,0.1);
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:last-child { border-bottom: none; }

.dropdown-menu a:hover {
    background: rgba(89,104,81,0.1);
    color: var(--blanco);
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
    display: block;
}

.dropdown:hover .chevron {
    transform: rotate(180deg);
}

/* Nav Social */
.nav-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-circle {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(89,104,81,0.2);
    color: rgba(255,255,255,0.6);
    transition: all 0.2s;
}

.social-circle:hover {
    border-color: var(--verde);
    color: var(--blanco);
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    color: var(--blanco);
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-toggle { display: none; }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(89,104,81,0.2);
}

@media (min-width: 1024px) {
    .mobile-menu { display: none !important; }
}

.mobile-menu.open {
    display: flex;
}

.mobile-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--verde);
}

.mobile-link {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

.mobile-link:hover { color: var(--blanco); }

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('/img/hero-bg.jpg') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    color: var(--blanco);
}

.text-gradient {
    background: linear-gradient(135deg, var(--verde), var(--arena));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    max-width: 36rem;
    margin: 1.5rem auto 0;
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hero-buttons { flex-direction: row; }
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blanco);
    background: var(--verde);
    border-radius: 0.5rem;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-elevated);
}

.btn-outline {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blanco);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--blanco);
    background: rgba(255,255,255,0.1);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-pill {
    width: 1.5rem;
    height: 2.5rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 9999px;
    padding: 0.25rem;
    display: flex;
    justify-content: center;
}

.scroll-dot {
    width: 0.25rem;
    height: 0.5rem;
    background: rgba(255,255,255,0.5);
    border-radius: 9999px;
    animation: bounceScroll 1.5s infinite;
}

/* ===== CAROUSEL ===== */
.carousel-section {
    overflow: hidden;
    background: var(--negro);
    padding: 3rem 0;
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: scrollCarousel 40s linear infinite;
}

.carousel-icon {
    flex-shrink: 0;
    width: 140px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gris-trans);
    transition: color 0.3s;
}

.carousel-icon:hover {
    color: var(--verde);
}

/* ===== SERVICES ===== */
.services {
    background: var(--arena);
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--verde);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(1.875rem, 4vw, 3rem);
    color: #000;
}

.section-title.light {
    color: var(--blanco);
}

.services-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
    background: var(--gradient-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-elevated);
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(89, 104, 81, 0.2);
    color: var(--verde);
    margin-bottom: 1.25rem;
    transition: background 0.3s, color 0.3s;
}

.service-card:hover .service-icon {
    background: var(--verde);
    color: var(--blanco);
}

.service-card h4 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--blanco);
    margin-bottom: 0.75rem;
}

.service-card p {
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
}

/* ===== ABOUT ===== */
.about {
    background: var(--negro);
    padding: 6rem 0;
}

.about-intro {
    margin-bottom: 5rem;
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-intro { grid-template-columns: 1fr 1fr; }
}

.about-text {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
}

.mission-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .mission-grid { grid-template-columns: 1fr 1fr; }
}

.mission-card {
    background: var(--gradient-card);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
}

.mission-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(89,104,81,0.2);
    color: var(--verde);
    margin-bottom: 1rem;
}

.mission-card h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--blanco);
    margin-bottom: 1rem;
}

.mission-card p {
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
}

/* ===== CONTACT ===== */
.contact {
    background: var(--arena);
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon-box {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: var(--oscuro);
    color: var(--verde);
}

.contact-item h4 {
    font-family: var(--font-title);
    font-size: 1.125rem;
    color: #000;
    margin-bottom: 0.25rem;
}

.contact-item a,
.contact-item p {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(0,0,0,0.55);
    /* Añadimos transform a la transición para que sea fluido */
    transition: color 0.3s ease, transform 0.3s ease; 
    /* Necesario para que el transform funcione en elementos inline como las 'a' */
    display: inline-block;
}

.contact-item a:hover {
    color: #000;
    transform: translateX(5px);
}

/* Contact Form */
.contact-form {
    background: var(--oscuro);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--blanco);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--verde);
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blanco);
    background: var(--verde);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-submit:hover {
    opacity: 0.9;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-nav); 
    padding: 5rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .footer-grid { 
        grid-template-columns: 2.5fr 1fr 2fr 2fr; 
        gap: 3rem; 
    }
}

.footer-col-logo {
    display: flex;
    align-items: flex-start;
}

.footer-logo-img {
    max-width: 220px; 
    height: auto;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blanco);
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
}

.footer-links a {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6); 
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.footer-links a:hover {
    color: #FFFFFF; 
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-social .social-circle {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(89, 104, 81, 0.4);
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    overflow: hidden;
    transition: border-color 0.3s ease, color 0.3s ease;
    z-index: 1;
    text-decoration: none;
}

.footer-social .social-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--verde);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.footer-social .social-circle:hover {
    border-color: var(--verde);
    color: var(--blanco);
}

.footer-social .social-circle:hover::before {
    transform: scale(1);
}

.footer-bottom {
    margin-top: 4rem;
    border-top: 1px solid rgba(184, 175, 158, 0.15); 
    width: 100%;
}

.whatsapp-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;
    color: var(--blanco);
    box-shadow: var(--shadow-elevated);
    transition: transform 0.2s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}