/* =====================================================
   MEJORAS MODERNAS — irenelamelas.com
   ===================================================== */

/* --- Importar nuevas fuentes premium --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Jost:wght@300;400;500;600;700&display=swap');

/* =====================================================
   VARIABLES DE COLOR
   ===================================================== */
:root {
    --verde: rgb(149, 188, 0);
    --verde-oscuro: rgb(120, 155, 0);
    --verde-suave: rgba(149, 188, 0, 0.12);
    --gris-texto: #333;
    --gris-suave: #f8f8f8;
    --blanco: #fff;
    --sombra: 0 4px 20px rgba(0,0,0,0.10);
    --sombra-hover: 0 8px 32px rgba(0,0,0,0.18);
    --transicion: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   SCROLL SUAVE GLOBAL
   ===================================================== */
html {
    scroll-behavior: smooth;
}

/* =====================================================
   HEADER MEJORADO — Logo + Nav en misma línea
   ===================================================== */
header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#stuck_container {
    padding: 10px 0;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .grid_12 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

header h1 {
    float: none;
    margin: 0;
    padding: 0;
    text-align: left;
    flex-shrink: 0;
}

/* Ocultar trigger en deskop */
.mobile-menu-trigger {
    display: none;
}

header h1:after {
    display: none !important;
}

header h1 a img {
    width: 280px !important;
    max-width: 280px !important;
    height: auto;
    transition: opacity var(--transicion);
}

header h1 a:hover img {
    opacity: 0.85;
}

.menu_block {
    margin-left: auto;
}

/* =====================================================
   NAVEGACION — Mejoras de hover y estilo
   ===================================================== */
.sf-menu li a {
    font-family: 'Jost', 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    padding: 6px 14px !important;
    border-radius: 6px;
    transition: background var(--transicion), color var(--transicion) !important;
    color: #444 !important;
}

.sf-menu li.current a,
.sf-menu li a:hover {
    color: var(--verde) !important;
    background: var(--verde-suave);
}

/* =====================================================
   BARRA DE CITA — CTA Activado
   ===================================================== */
.block1 {
    background: linear-gradient(135deg, rgb(149,188,0) 0%, rgb(110,148,0) 100%);
    padding: 32px 0 38px;
}

.block1 .rel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.btn-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 14px 40px;
    background: #fff;
    color: var(--verde-oscuro) !important;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all var(--transicion);
    border: 2px solid transparent;
}

.btn-cta:hover {
    background: transparent;
    color: #fff !important;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

/* =====================================================
   GALERIA — Restaurar y mejorar estilos gal_item
   ===================================================== */
.gal_item {
    display: block;
    position: relative;
    margin-bottom: 22px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: var(--sombra);
    transition: box-shadow var(--transicion), transform var(--transicion);
}

.gal_item:hover {
    box-shadow: var(--sombra-hover);
    transform: translateY(-3px);
}

.gal_item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.gal_item:hover img {
    transform: scale(1.04);
}

.gal_item .gal_caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    font: 600 16px/1.4 'Inter', 'Open Sans', sans-serif;
    padding: 28px 14px 12px;
    transform: translateY(100%);
    transition: transform var(--transicion);
    border-radius: 0 0 6px 6px;
}

.gal_item:hover .gal_caption {
    transform: translateY(0);
}

.gal_magnify {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    background: url(../images/ui/magnify.png) center center no-repeat;
    background-size: 40px 40px;
    opacity: 0;
    transition: opacity var(--transicion);
}

.gal_item:hover .gal_magnify {
    opacity: 0.8;
}

/* =====================================================
   FILTROS DE PORTAFOLIO
   ===================================================== */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 30px 0 40px;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    z-index: 100;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.filter-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid var(--verde);
    border-radius: 50px;
    background: transparent;
    color: var(--verde);
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transicion);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--verde);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(149,188,0,0.35);
    transform: translateY(-1px);
}

.filter-section-title {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 8px;
}

.filter-section-title h3 {
    transition: opacity 0.3s ease;
}

/* Items ocultos durante filtrado */
.gal-item-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gal-item-wrapper.hidden {
    display: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 0 0 40px;
}

/* =====================================================
   FOTO SECCIÓN INDEX — Mejoras layout
   ===================================================== */
.content .grid_4 h3 {
    color: var(--verde);
    font-family: 'Cormorant Garamond', 'BenchNine', serif;
    font-size: 30px;
}

/* =====================================================
   VIDEOS — Mejor presentación
   ===================================================== */
.video-section {
    background: var(--gris-suave);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.video-section video {
    border-radius: 8px;
    box-shadow: var(--sombra);
}

.video-label {
    font-family: 'Cormorant Garamond', serif;
    color: var(--verde);
    font-size: 22px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 10px;
    padding-top: 0;
}

/* =====================================================
   CARDS DE CONTACTO
   ===================================================== */
.contact-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--sombra);
    padding: 28px 32px;
    margin-bottom: 24px;
    transition: box-shadow var(--transicion), transform var(--transicion);
}

.contact-card:hover {
    box-shadow: var(--sombra-hover);
    transform: translateY(-2px);
}

.contact-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.contact-locations {
    color: #666;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.contact-locations .location-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.contact-locations .fa {
    color: var(--verde);
    width: 18px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--gris-suave);
    color: #333 !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--transicion);
}

.social-link:hover {
    background: var(--verde-suave);
    color: var(--verde-oscuro) !important;
    transform: translateX(4px);
}

.social-link img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

/* =====================================================
   FOOTER MEJORADO
   ===================================================== */
footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 40px;
}

footer .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

footer .footer-brand img {
    width: 200px;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

footer .footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #aaa;
}

footer .footer-contact-info a {
    color: #ccc;
    transition: color var(--transicion);
}

footer .footer-contact-info a:hover {
    color: var(--verde);
}

footer .footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

footer .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    transition: background var(--transicion), transform var(--transicion);
    font-size: 18px;
}

footer .footer-social a:hover {
    background: var(--verde);
    transform: translateY(-3px);
}

footer .footer-social img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #666;
}

footer .footer-bottom a {
    color: #888;
    transition: color var(--transicion);
}

footer .footer-bottom a:hover {
    color: var(--verde);
}

footer .copy {
    float: none;
    color: #888;
    font-size: 13px;
}

/* =====================================================
   ANIMACIONES FADE-IN al scroll
   ===================================================== */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   SECCION INICIO — mejoras
   ===================================================== */
.content .gallery {
    padding-top: 10px;
}

.instagram-link-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--verde) 0%, var(--verde-oscuro) 100%);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all var(--transicion);
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(149,188,0,0.35);
}

.instagram-link-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(149,188,0,0.45);
    color: #fff !important;
}

.instagram-link-hero img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* =====================================================
   ENLACES PAGE — Grid mejorado
   ===================================================== */
.enlaces-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 30px 0;
}

.enlaces-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--sombra);
}

.enlaces-item-date {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--verde);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
    text-align: center;
}

/* =====================================================
   CAROUSEL (CAMERAJS) — Estilo Global Moderno
   ===================================================== */
.camera_target_content {
    background-position: center !important;
}

.caption {
    display: block !important;
    padding: 20px 60px 15px !important; /* Más compacto: menos arriba, mínimo abajo */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    text-align: center !important;
    width: 100% !important;
    left: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    height: auto !important;
    min-height: 120px; /* Reducido para dar más espacio a las fotos */
    border-radius: 0 !important;
    box-sizing: border-box;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

.caption-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.caption .title {
    font-size: 34px !important;
    line-height: 1.1 !important;
    margin-bottom: 0 !important; /* El margen lo maneja el header */
    padding-bottom: 0 !important; /* Eliminar padding heredado que rompía el centrado */
    border-bottom: none !important; /* Eliminar borde heredado */
    font-family: 'Jost', sans-serif !important;
    font-weight: 700 !important;
    color: #fff !important; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.caption p {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important; /* Texto lo más abajo posible */
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.caption img {
    width: 48px !important;
    height: auto !important;
    margin: 0 !important;
    filter: none !important; /* Colores originales */
    opacity: 1;
}

/* Navegación Minimalista - Mayor contraste */
.camera_prev, .camera_next {
    width: 50px !important;
    height: 80px !important;
    top: 50% !important;
    margin-top: -40px !important;
    margin-left: 0 !important;
    background-color: rgba(0,0,0,0.2) !important; /* Fondo más oscuro para contraste */
    background-image: none !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 6px !important;
    z-index: 999 !important;
    transition: all var(--transicion) !important;
    border: 1px solid rgba(255,255,255,0.25) !important; /* Borde más visible */
}

.camera_prev:hover, .camera_next:hover {
    background-color: var(--verde) !important; /* Cambiar a verde de la marca al hover */
    border-color: var(--verde) !important;
    transform: scale(1.05);
}

.camera_prev { left: 20px !important; }
.camera_next { right: 20px !important; left: auto !important; }

.camera_prev > span, .camera_next > span {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    margin: 28px auto 0 !important;
    background-size: contain !important;
    opacity: 0.9 !important;
}

.camera_prev > span { background: url(../images/ui/prevnext1.png) 0 center no-repeat !important; background-size: cover !important; }
.camera_next > span { background: url(../images/ui/prevnext1.png) right center no-repeat !important; background-size: cover !important; }

/* =====================================================
   RESPONSIVE MOBILE MEJORADO
   ===================================================== */
@media (max-width: 768px) {
    header {
        position: relative;
        z-index: 1100 !important;
    }

    #stuck_container {
        z-index: 1100 !important;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Header e ícono de hamburguesa */
    header .container {
        padding: 5px 20px;
    }

    header .grid_12 {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }

    header h1 {
        z-index: 1102 !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }

    header h1 a {
        max-width: none !important;
        overflow: visible !important;
        display: inline-block !important;
    }

    header h1 a img {
        width: 160px !important;
        max-width: 160px !important;
        transition: var(--transicion);
    }

    .mobile-menu-trigger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1102 !important;
        transition: var(--transicion);
    }

    .mobile-menu-trigger span {
        width: 100%;
        height: 3px;
        background-color: var(--verde);
        border-radius: 4px;
        transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    }

    .mobile-menu-trigger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-trigger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .mobile-menu-trigger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Menú lateral (Slide-in) */
    .menu_block {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1101 !important;
        padding: 100px 0 40px;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: block !important;
        margin: 0;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column;
        border-left: 1px solid rgba(255,255,255,0.1);
    }

    .menu_block.open {
        right: 0;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 1050 !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    .mobile-menu-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    /* Ocultar el antiguo menú select y el menú generado por el plugin */
    .select-menu, 
    select.nav-menu, 
    select.sf-menu,
    .horizontal-nav select {
        display: none !important;
    }

    /* Reset completo para navegación móvil */
    .menu_block nav,
    .menu_block ul {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .sf-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        float: none !important;
        width: 100% !important;
    }

    .sf-menu li {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    .sf-menu li a {
        display: block !important;
        font-size: 17px !important;
        line-height: normal !important;
        padding: 16px 30px !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
        color: #333 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        transition: all 0.3s ease !important;
        text-transform: none !important;
        letter-spacing: 0.5px !important;
        font-weight: 500 !important;
    }

    /* Ocultar flechas de Superfish en móviles para evitar colisiones */
    .sf-arrows .sf-with-ul::after,
    .sf-arrows .sf-with-ul:after,
    .sf-arrows > li > .sf-with-ul:after,
    .sf-arrows > li > .sf-with-ul::after,
    .sf-menu li a:after,
    .sf-menu li a::after,
    .sf-sub-indicator {
        display: none !important;
        content: none !important;
        visibility: hidden !important;
    }

    .sf-menu li a:hover,
    .sf-menu li.current a {
        color: var(--verde) !important;
        background: rgba(149, 188, 0, 0.05) !important;
        padding-left: 35px !important;
    }

    .sf-menu li:last-child a {
        border-bottom: none !important;
    }

    /* Ajustes de contenido */
    .block1 {
        padding: 40px 20px;
    }

    .block1 .rel {
        gap: 20px;
    }

    .block1 div[style*="font-size: x-large"] {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }

    /* Galería e imágenes */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .content .grid_4 h3 {
        text-align: left;
        padding-top: 30px;
    }

    /* Footer */
    footer .footer-top {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding-left: 20px;
    }

    footer .footer-contact-info {
        align-items: flex-start;
    }

    footer .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
    }

    /* Slider CameraJS en móviles - Altura fija y ajustes proporcionales */
    .slider_wrapper, 
    .camera_wrap, 
    .camera_target_content, 
    .cameraContents {
        height: 400px !important;
        min-height: 400px !important;
    }

    .caption {
        padding: 20px 15px 10px !important;
        min-height: 100px;
    }

    .caption-header {
        gap: 10px;
        margin-bottom: 5px;
    }

    .caption .title {
        font-size: 24px !important;
    }

    .caption p {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
    }

    .caption img {
        width: 36px !important;
    }

    .camera_prev, .camera_next {
        width: 40px !important;
        height: 60px !important;
        margin-top: -30px !important;
    }

    .camera_prev { left: 0 !important; }
    .camera_next { right: 0 !important; }

    .camera_prev > span, .camera_next > span {
        margin-top: 18px !important;
    }

    /* Imágenes de sobre mí */
    .gallery .grid_4 a.gal_item {
        margin-bottom: 15px;
    }

    /* Enlaces de Instagram Héroe */
    .instagram-link-hero {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    header h1 a img {
        width: 150px !important;
        max-width: 150px !important;
    }

    /* Padding de texto mejorado para pantallas pequeñas */
    .block1, .content, .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .btn-cta {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* Ajustes específicos para teléfonos estrechos (iPhone SE, 12, 13 mini, etc hasta 414px) */
@media (max-width: 414px) {
    header h1 a {
        max-width: none !important;
        overflow: visible !important;
    }

    header h1 a img {
        width: 130px !important;
        max-width: 130px !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Stack en formularios para evitar desbordamiento horizontal */
    .mf-input-row {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        display: flex !important;
    }

    #codigo-input, #btn-buscar {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* Ajuste de filtros en portafolio para pantallas muy pequeñas */
    .portfolio-filters {
        padding: 20px 10px !important;
        gap: 8px !important;
    }

    .filter-btn {
        padding: 6px 14px !important;
        font-size: 13px !important;
    }
}

