/**
 * Estilos principales del sitio
 * Diseño minimalista y elegante para portfolio de fotografía
 */

/* Variables CSS para fácil mantenimiento */
:root {
    --primary-color: #000000;
    --secondary-color: #666666;
    --background-color: #ffffff;
    --text-color: #000000;
    --border-color: #e0e0e0;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    font-weight: 400;
}

/* Header */
.site-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.site-branding {
    padding: 1rem 0;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.site-logo-img {
    max-height: 80px;
    width: auto;
    height: auto;
    display: block;
}

.site-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-color);
    margin: 0.5rem 0 0 0;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Navegación */
.header-nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.site-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Botón hamburguesa móvil */
.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Menú móvil */
.mobile-navigation {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.mobile-navigation.open {
    max-height: 500px;
    padding: 1rem 0;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-menu li {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-menu li:last-child {
    border-bottom: none;
}

.mobile-nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    display: block;
    padding: 1rem 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    color: var(--primary-color);
    padding-left: 1rem;
}

/* Main content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* Contenido de páginas */
.content-section {
    padding: 2rem 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.content-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.content-text p {
    margin-bottom: 1.5rem;
}

/* Formularios */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0.75rem;
    font-family: var(--font-sans);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 0;
    padding: 0.75rem 2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.btn-dark:hover {
    background-color: #333333;
    border-color: #333333;
}

/* Portfolio Grid - Estilo minimalista */
.portfolio-grid-section {
    padding: 3rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.portfolio-item {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--background-color);
    cursor: pointer;
    aspect-ratio: 1;
    transition: transform 0.2s ease;
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    background-color: rgb(226, 226, 226);
}

.portfolio-title {
    color: black;
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
}

/* Gallery Modal/Lightbox */
.gallery-modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 0;
}

.gallery-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
}

.gallery-modal-title {
    color: var(--background-color);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.1rem;
}

.gallery-modal-body {
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--background-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 10;
    border-radius: 0;
    padding: 0;
}

.gallery-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--background-color);
}

.gallery-nav-prev {
    left: 1rem;
}

.gallery-nav-next {
    right: 1rem;
}

.gallery-nav-btn span {
    line-height: 1;
    font-weight: 300;
}

/* Ocultar botones de navegación en móvil si hay poco espacio */
@media (max-width: 768px) {
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .gallery-nav-prev {
        left: 0.5rem;
    }
    
    .gallery-nav-next {
        right: 0.5rem;
    }
    
    .gallery-modal-body {
        padding: 1rem;
        min-height: 50vh;
    }
    
    .gallery-modal-image {
        max-height: 70vh;
    }
}

/* Galería de imágenes (para páginas como Obra) */
.image-gallery-item {
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--background-color);
}

.image-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.image-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer */
.site-footer {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .site-branding {
        padding: 0.5rem 0;
    }
    
    .site-logo-img {
        max-height: 60px;
    }
    
    .site-subtitle {
        font-size: 0.8rem;
        margin: 0.25rem 0 0 0;
    }
}

@media (max-width: 768px) {
    .site-logo-img {
        max-height: 60px;
    }
    
    .site-subtitle {
        font-size: 0.8rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .portfolio-title {
        font-size: 0.9rem;
    }
    
    .portfolio-grid-section {
        padding: 2rem 0;
    }
    
    .site-main {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .site-logo-img {
        max-height: 45px;
    }
    
    .site-subtitle {
        font-size: 0.7rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .portfolio-title {
        font-size: 0.85rem;
    }
    
    .portfolio-grid-section {
        padding: 1.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

