/*
Theme Name: Portfolio Fotógrafo
Description: Tema personalizado inspirado en Franklin Yeep. Diseño minimalista para portfolios de fotografía.
Author: Tu Nombre
Version: 1.0.0
License: GPL v2 or later
Text Domain: portfolio-theme
*/

/* ==========================================================================
   Reset CSS básico
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #000;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout Principal
   ========================================================================== */

.site-container {
    display: flex;
    min-height: 100vh;
    background-color: #000;
}

/* Sidebar Izquierdo */
.site-sidebar {
    width: 250px;
    background-color: #000;
    color: #fff;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid #333;
}

.site-sidebar::-webkit-scrollbar {
    width: 4px;
}

.site-sidebar::-webkit-scrollbar-track {
    background: #000;
}

.site-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

/* Logo/Título Principal */
.site-header {
    margin-bottom: 40px;
}

.site-title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    color: #fff;
    text-decoration: none;
    display: block;
}

.site-subtitle {
    font-size: 12px;
    color: #888;
    font-weight: 300;
    margin-bottom: 20px;
}

/* Logo centrado */
.site-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.site-logo-sidebar img,
.site-logo-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Navegación Principal */
.main-navigation {
    margin-bottom: 40px;
}

.main-navigation ul {
    list-style: none;
}

.main-navigation li {
    margin-bottom: 8px;
}

.main-navigation a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    font-weight: 300;
    display: block;
    padding: 8px 0;
    transition: color 0.3s ease;
    border-left: 2px solid transparent;
    padding-left: 10px;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: #fff;
    border-left-color: #fff;
}

/* Menú hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.hamburger {
    display: inline-block;
    width: 32px;
    height: 24px;
    position: relative;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 4px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-navigation {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100vw;
        background: #111;
        z-index: 1000;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    .main-navigation.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .nav-menu li {
        width: 100%;
        text-align: center;
        margin: 15px 0;
    }
}

/* Área de Contenido Principal */
.site-main {
    flex: 1;
    margin-left: 250px;
    background-color: #000;
    padding: 0;
}

/* Grid de Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    padding: 0;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background-color: #111;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
}

.portfolio-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-title {
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Copyright/Footer Sidebar */
.site-footer-sidebar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.copyright {
    font-size: 10px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Social Links */
.social-links {
    margin-top: 20px;
}

.social-links a {
    color: #555;
    font-size: 18px;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #fff;
}

/* Espaciado general */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
*,
*:before,
*:after {
    box-sizing: inherit;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .site-container {
        flex-direction: column;
    }

    .site-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }

    .site-main {
        margin-left: 0;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .main-navigation {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        margin-bottom: 20px;
    }

    .main-navigation ul {
        display: flex;
        gap: 20px;
    }

    .main-navigation li {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .site-sidebar {
        padding: 15px;
    }

    .site-title {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ==========================================================================
   Estados de Carga
   ========================================================================== */

.loading {
    opacity: 0.5;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Utilidades
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
