/* ==========================================================================
   Daniela Collomb Portfolio - Base Design inspired by Erin McClean
   Left vertical sidebar navigation + Right scrolling prominent gallery
   ========================================================================== */

:root {
    --bg-color: #FFFFFF;
    --bg-secondary: #F9F9F8;
    --text-primary: #222222;
    --text-secondary: #707070;
    --text-muted: #9E9E9E;
    --accent-color: #A37F63;
    --accent-hover: #86644B;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.04);
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --sidebar-width: 270px;
    --content-max-width: 1400px;
    --right-breathing-space: clamp(30px, 5vw, 90px);
    --radius-sm: 4px;
    --radius-md: 8px;
    --transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

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

/* Page Layout Wrapper */
.site-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* ==========================================================================
   Sidebar Navigation (Left)
   ========================================================================== */
.site-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-color);
    padding: 45px 35px 40px 45px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 100;
    border-right: 1px solid var(--border-subtle);
}

.sidebar-header {
    margin-bottom: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: block;
    max-width: 190px;
    width: 100%;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.85;
}

.site-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Mobile Hamburger Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 110;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav Links List */
.site-nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-link {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    padding: 4px 0;
    position: relative;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 18px;
    height: 1.5px;
    background-color: var(--accent-color);
}

/* Sidebar Footer (Social & Copyright) */
.sidebar-footer {
    margin-top: auto;
    padding-top: 30px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.social-links a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Language Switcher (Top Right)
   ========================================================================== */
.lang-switcher {
    position: fixed;
    top: 25px;
    right: clamp(20px, 3.5vw, 45px);
    z-index: 150;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.lang-switcher:hover {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.lang-link {
    color: var(--text-muted);
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 2px 4px;
}

.lang-link:hover {
    color: var(--text-primary);
}

.lang-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

.lang-divider {
    color: var(--border-color);
    font-size: 0.72rem;
    user-select: none;
}

/* ==========================================================================
   Main Content Area (Right)
   Leaving the distinct white breathing margin on the right
   ========================================================================== */
.site-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 45px var(--right-breathing-space) 80px 45px;
    max-width: calc(var(--content-max-width) + var(--sidebar-width));
}

.content-container {
    width: 100%;
}

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-style: italic;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Home / Illustrations Gallery Layout
   ========================================================================== */
.gallery-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.gallery-row {
    width: 100%;
}

/* Single item centered row (Fila 1 habitacion, Fila 2 libro) */
.gallery-row.single {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-row.single .portfolio-item {
    max-width: 950px;
    width: 100%;
    margin: 0 auto;
}

/* Two items row (Fila 4 niña + familia/boceto, Fila 5 littlesea + mermaids) */
.gallery-row.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.gallery-column {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.portfolio-item {
    position: relative;
    width: 100%;
    background-color: var(--bg-secondary);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.portfolio-item:hover img {
    transform: scale(1.02);
}

.security-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* ==========================================================================
   Books Page
   ========================================================================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 50px 40px;
}

.book-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--bg-secondary);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.book-card:hover .book-cover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.book-details {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    font-weight: 500;
}

.book-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Tienda (Shop) Page
   ========================================================================== */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px 30px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    transition: transform 0.3s ease;
}

.product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.product-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--bg-secondary);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.04);
}

.product-card h3 {
    font-size: 1.15rem;
    font-family: var(--font-body);
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.btn-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-color);
    font-weight: 500;
    margin-top: auto;
    transition: color 0.2s ease;
}

.btn-shop:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   About Page
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: flex-start;
    max-width: 1100px;
}

.about-image {
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h1,
.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 24px;
    font-style: italic;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.75;
}

.about-highlights {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.highlight-item h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.highlight-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ==========================================================================
   Contact Page
   ========================================================================== */
.contact-layout {
    width: 100%;
    max-width: 780px;
}

.contact-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-top: 15px;
    max-width: 950px;
}

.contact-form-wrapper {
    width: 100%;
    margin-top: 35px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--text-primary);
    background-color: #FFFFFF;
}

.btn-submit {
    align-self: flex-start;
    padding: 14px 36px;
    background-color: var(--text-primary);
    color: #FFFFFF;
    border: none;
    font-family: var(--font-body);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: var(--accent-color);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .site-sidebar {
        padding: 40px 25px 30px 30px;
    }
    
    .site-main {
        padding: 40px 30px 60px 35px;
    }
    
    .gallery-container {
        gap: 35px;
    }
    
    .gallery-row.two-columns {
        gap: 25px;
    }
    
    .about-grid {
        gap: 40px;
    }
}

@media (max-width: 820px) {
    .site-wrapper {
        flex-direction: column;
    }
    
    .site-sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        padding: 20px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .lang-switcher {
        top: 20px;
        right: 68px;
        padding: 4px 10px;
        font-size: 0.74rem;
        z-index: 120;
    }
    
    .sidebar-header {
        margin-bottom: 0;
        width: 100%;
    }
    
    .logo-link {
        max-width: 150px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .site-nav {
        display: none;
        padding-top: 25px;
        animation: fadeIn 0.3s ease;
    }
    
    .site-nav.open {
        display: flex;
    }
    
    .nav-links {
        gap: 15px;
        padding-bottom: 25px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        font-size: 1.1rem;
    }
    
    .sidebar-footer {
        padding-top: 20px;
    }
    
    .site-main {
        margin-left: 0;
        padding: 30px 20px 60px 20px;
    }
    
    /* Sobre Mí: Texto primero y luego imagen en móvil */
    .about-grid {
        display: flex;
        flex-direction: column;
        gap: 35px;
    }

    .about-text {
        order: 1;
    }

    .about-image {
        order: 2;
        max-width: 440px;
        width: 100%;
        margin: 0 auto;
    }
    
    .gallery-row.two-columns {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .gallery-column {
        gap: 25px;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}