/* ============================================
   MyG Inmobiliaria - Gestión de Alquileres
   Hoja de Estilos Principal
   ============================================ */

/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.contenedor-formulario {
  max-width: 600px;      /* El ancho máximo que quieras (ajústalo a tu gusto) */
  margin: 0 auto;       /* Esto es el "truco mágico" para centrar horizontalmente */
  padding: 20px;        /* Un poco de aire alrededor por si acaso */
  box-sizing: border-box;
}

:root {
    --color-primary: #2c3e50;
    --color-secondary: #34495e;
    --color-accent: #e67e22;
    --color-light: #ecf0f1;
    --color-white: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ============================================
   LOGO
   ============================================ */
.logo-img {
    height: 80px; 
    width: 150px;
    display: block;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
header {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Links de navegación */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s;
}

.nav-links > li > a:hover::after,
.nav-links > li > a.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown > a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s;
    display: inline-block;
}

.dropdown.active > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--color-secondary);
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: #f8f9fa;
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    padding-left: 1.8rem;
}

/* Menú Móvil */
.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   PAGE HEADER (Hero)
   ============================================ */
.page-header {
    margin-top: 80px;
    color: var(--color-white);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../fotos/imagenInicio.png');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    z-index: 0;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
}

/* ============================================
   INTRO SECTION
   ============================================ */
.intro-section {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.intro-section h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.intro-section p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ============================================
   TABS
   ============================================ */
.tabs-section {
    background: #f8f9fa;
    padding: 3rem 2rem;
}

.tabs-container {
    max-width: 1000px;
    margin: 0 auto;
}

.tabs-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-button.active {
    color: var(--color-accent);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   FORMULARIO
   ============================================ */
.form-section {
    padding: 3rem 2rem 5rem;
    background: #f8f9fa;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-container h2 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.form-subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label span {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-accent);
}

.checkbox-group label {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: normal;
}

.checkbox-group a {
    color: var(--color-accent);
    text-decoration: none;
}

.submit-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.6);
    background: #d35400;
}

/* ============================================
   BENEFICIOS
   ============================================ */
.benefits-section {
    padding: 5rem 2rem;
    background: var(--color-white);
}

.benefits-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.benefit-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ============================================
   PROCESO
   ============================================ */
.process-section {
    padding: 5rem 2rem;
    background: var(--color-primary);
    color: white;
}

.process-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.process-section h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    padding: 2rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.step p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: 5rem 2rem;
    text-align: center;
    background: #f8f9fa;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-section h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: #666;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.6);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 2rem 1rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--gray-300);
    text-decoration: none;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background: #25d366;
    border-radius: 50px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* ============================================
   ANIMACIONES
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        gap: 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
        background: #f8f9fa;
        border-radius: 0;
    }

    .dropdown.active .dropdown-menu {
        visibility: visible;
        max-height: 300px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .tabs-nav {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}