/* ===================================
   RESET Y VARIABLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores Ibicencos */
    --white: #FFFFFF;
    --off-white: #FAFAFA;
    --cream: #F8F6F3;
    --sand: #E8E4DF;
    --stone: #D4CFC7;
    --sea-blue: #4A90A4;
    --deep-blue: #2C5F6F;
    --text-primary: #2B2B2B;
    --text-secondary: #666666;
    --text-light: #999999;
    
    /* Tipografía */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
}

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

/* ===================================
   HEADER & NAVIGATION
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--sand);
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--sea-blue);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--sea-blue);
}

.nav-link:hover::after {
    width: 100%;
}

/* Ocultar el checkbox */
.nav-toggle-checkbox {
    display: none;
}

/* Overlay oscuro (solo móvil) */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    display: block;
}

/* Animación del hamburguesa cuando está activo */
.nav-toggle-checkbox:checked ~ label.nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.nav-toggle-checkbox:checked ~ label.nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-checkbox:checked ~ label.nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Mostrar overlay cuando el menú está abierto (solo móvil) */
@media (max-width: 968px) {
    .nav-toggle-checkbox:checked ~ .nav-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, var(--white) 0%, var(--cream) 100%);
    position: relative;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background-color: var(--sea-blue);
    margin: 2rem auto;
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--stone);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
    font-weight: 400;
}

.btn-primary:hover {
    background-color: var(--sea-blue);
    color: var(--white);
    border-color: var(--sea-blue);
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--text-light) 0%, transparent 100%);
    animation: scrollAnimation 2s infinite;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-label {
    display: block;
    color: var(--sea-blue);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.divider-small {
    width: 50px;
    height: 1px;
    background-color: var(--stone);
    margin: 1.5rem 0;
}

.section-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ===================================
   FEATURES SECTION
   =================================== */
.features {
    padding: var(--spacing-xl) 0;
    background-color: var(--cream);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.feature-card {
    background-color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--sand);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

/* ===================================
   GALLERY SECTION
   =================================== */
.gallery {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    background-color: var(--off-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 12px;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--off-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.contact-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-item a {
    color: var(--sea-blue);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--deep-blue);
}

/* Mapa de Contacto */
.contact-map {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--stone);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.map-container:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.map-container iframe {
    display: block;
    width: 100%;
}

.btn-maps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    padding: 3rem 0;
    background-color: var(--text-primary);
    color: var(--white);
}

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

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.footer-text {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
    color: var(--white);
}

.footer-section p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollAnimation {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* Botones móviles en hamburguesa (ocultos en desktop) */
.nav-auth-mobile {
    display: none !important;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 968px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    /* Mostrar menú cuando el checkbox está marcado */
    .nav-toggle-checkbox:checked ~ .nav-menu {
        left: 0;
    }

    .nav-toggle {
        display: flex;
        order: 3;
        z-index: 1000;
    }

    .nav-auth {
        display: none !important;
    }

    .nav-user {
        order: 2;
    }

    .nav-auth-mobile {
        display: block !important;
        list-style: none;
    }

    .btn-auth-mobile {
        width: 100%;
        padding: 14px 24px;
        border: none;
        border-radius: 12px;
        font-family: 'Montserrat', sans-serif;
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .btn-login-mobile {
        background: white;
        color: #333;
        border: 2px solid #ddd;
    }
    
    .btn-login-mobile:hover {
        background: #f8f8f8;
        border-color: #333;
    }
    
    .btn-register-mobile {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    
    .btn-register-mobile:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .map-container iframe {
        height: 350px;
    }
    
    .gallery {
        padding: var(--spacing-lg) 0;
    }
    
    .gallery .container {
        padding: 0;
    }
    
    .gallery-header {
        padding: 0 1.5rem;
        margin-bottom: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item {
        border-radius: 0;
        aspect-ratio: 3/4;
        background-color: var(--cream);
    }
    
    .gallery-item img {
        border-radius: 0;
    }

    /* Footer responsive */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 2rem;
        text-align: center;
    }

    .footer-social {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}
/* ===================================
   AUTH MODALS
   =================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    position: relative;
    animation: fadeInUp 0.4s ease;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--sand);
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Styles */
.auth-form .form-group {
    margin-bottom: 1.2rem;
}

.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--stone);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition);
    background-color: var(--off-white);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--sea-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    gap: 1rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.2rem;
}

.link-forgot, .link-inline {
    color: var(--sea-blue);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.link-forgot:hover, .link-inline:hover {
    color: var(--deep-blue);
    text-decoration: underline;
}

.error-message {
    background-color: #ffe6e6;
    color: #d93025;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border-left: 4px solid #d93025;
}

.success-message {
    background-color: #e6f4ea;
    color: #137333;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border-left: 4px solid #137333;
}

.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--sea-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.btn-submit:hover {
    background-color: var(--deep-blue);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.form-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--sand);
}

.form-footer a {
    color: var(--sea-blue);
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ===================================
   AUTH BUTTONS
   =================================== */
.nav-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-auth {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--stone);
    background: var(--white);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font-body);
    text-decoration: none;
}

.btn-login:hover {
    background: var(--sand);
    border-color: var(--text-light);
}

.btn-register {
    background: var(--sea-blue);
    color: var(--white);
    border-color: var(--sea-blue);
}

.btn-register:hover {
    background: var(--deep-blue);
    border-color: var(--deep-blue);
}

/* User Dropdown */
.nav-user {
    display: block;
}

.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
}

.user-button:hover {
    background-color: var(--sand);
}

.user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1001;
    border: 1px solid var(--sand);
    margin-top: 0.5rem;
}

.user-dropdown.active .user-menu {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
}

.user-menu-item:hover {
    background-color: var(--off-white);
    color: var(--sea-blue);
}

.user-menu-divider {
    height: 1px;
    background-color: var(--stone);
    margin: 0.5rem 0;
}

/* Responsive para modales */
@media (max-width: 640px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}