/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --primary-color: #333;
    --secondary-color: #888;
    --background-color: #f9f9f9;
    --text-color: #333;
    --white: #ffffff;
    --overlay: rgba(0, 0, 0, 0.7);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* Encabezado y navegación */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    z-index: 1001;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 30px;
}

.menu a {
    position: relative;
    padding: 5px 0;
}

.menu a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.menu a:hover:after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Sección principal */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transition: opacity 1s ease;
}

.hero-content {
    text-align: center;
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 30px;
    max-width: 90%;
    border-radius: 2px;
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 300;
    line-height: 1.8;
}

/* Página de Obras */
.gallery-section {
    padding: 100px 0 50px;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2rem);
    letter-spacing: 2px;
}

.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    gap: 10px;
}

.category-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.category-btn.active, .category-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    height: 280px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--overlay);
    color: var(--white);
    padding: 15px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

/* Página de Curriculum */
.cv-section {
    padding: 100px 0 50px;
}

.cv-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2rem);
    letter-spacing: 2px;
}

.cv-content {
    max-width: 800px;
    margin: 0 auto;
}

.cv-section h3 {
    margin: 30px 0 15px;
    font-weight: 400;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cv-section ul {
    list-style-type: none;
    margin-left: 20px;
}

.cv-section li {
    margin-bottom: 10px;
    position: relative;
}

.cv-section li:before {
    content: "•";
    position: absolute;
    left: -15px;
    color: var(--secondary-color);
}

/* Página de Detalles de Obra */
.artwork-detail {
    padding: 100px 0 50px;
}

.artwork-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.artwork-slideshow {
    width: 100%;
    max-width: 800px;
    position: relative;
    margin-bottom: 30px;
}

.slideshow-container {
    position: relative;
    overflow: hidden;
    height: 80vh;
    min-height: 600px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
}

.slide-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

.dots-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--primary-color);
}

.artwork-info {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.artwork-info h2 {
    margin-bottom: 15px;
    font-weight: 400;
    font-size: 1.8rem;
}

.artwork-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    transition: var(--transition);
}

.back-button:hover {
    background-color: #555;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: #ddd;
}

/* Responsive */
@media (max-width: 992px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .slideshow-container {
        height: 70vh;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .menu.active {
        right: 0;
    }
    
    .menu li {
        margin: 15px 0;
    }
    
    .menu a {
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .categories {
        gap: 5px;
    }
    
    .category-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .slideshow-container {
        height: 60vh;
        min-height: 450px;
    }
    
    .slide-nav {
        width: 40px;
        height: 40px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        margin-bottom: 30px;
    }
    
    .category-btn {
        white-space: nowrap;
    }
    
    .slideshow-container {
        height: 50vh;
        min-height: 350px;
    }
    
    .slide-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .prev {
        left: 10px;
    }
    
    .next {
        right: 10px;
    }
    
    .artwork-info {
        padding: 0 15px;
    }
    
    .artwork-info h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 1.2rem;
    }
    
    .hero h1 {
        letter-spacing: 2px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .slideshow-container {
        height: 45vh;
        min-height: 300px;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Soporte para orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }
    
    .hero-content {
        max-width: 80%;
    }
}
