/* Modern Art Gallery Theme */
@import url('http://artistassigloxxi.es/error.html');

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #c0392b;
    /* Deep Red for actions/highlights */
    --gold: #d4af37;
    /* Premium feel */
    --text-color: #333333;
    --text-light: #777777;
    --white: #ffffff;

    /* Theme Colors */
    --bg-oleo: #fbfbf8;
    /* Warm Canvas */
    --bg-acuarela: #f4faff;
    /* Cool Water */
    --bg-digital: #121212;
    /* Dark Mode */
    --bg-regalos: #fffafa;
    /* Soft Pink tint */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --container-width: 1200px;
    --header-height: 80px;

    --radius: 4px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.my-lg {
    margin: var(--spacing-lg) 0;
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

/* Theme Backgrounds */
body.theme-oleo {
    background-color: var(--bg-oleo);
}

body.theme-acuarela {
    background-color: var(--bg-acuarela);
}

body.theme-digital {
    background-color: var(--bg-digital);
    color: #e0e0e0;
}

body.theme-regalos {
    background-color: var(--bg-regalos);
}

/* Theme Specific Overrides */
body.theme-digital h1,
body.theme-digital h2,
body.theme-digital h3,
body.theme-digital .art-title,
body.theme-digital .logo {
    color: #fff;
}

body.theme-digital .site-header {
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-digital .art-card {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.theme-digital .main-nav a.active {
    color: #fff;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;

    /* Decorative frame effect */
    padding: 20px;
    background: white;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.1),
        0 0 40px rgba(0, 0, 0, 0.3),
        inset 0 0 0 8px white,
        inset 0 0 0 9px rgba(0, 0, 0, 0.2);
    border-radius: 2px;

    /* Animation definition */
    transition: transform 3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    transform-origin: center center;
}


.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}


/* Components */

/* Header */
.site-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.logo span {
    color: var(--accent-color);
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-md);
}

.main-nav a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 80vh;
    min-height: 500px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Lighthouse Hero */
.hero-lighthouse {
    background-image: url('../css_files/luzfaro.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-lighthouse .hero-content h1,
.hero-lighthouse .hero-content p {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    display: block;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.btn-hero {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid white;
    font-weight: 700;
    padding: 1.2rem 2.5rem;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
}

.btn-hero:hover {
    background-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Page Gradient Overlays */
.page-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Óleo - Warm earthy tones */
.gradient-oleo {
    background:
        radial-gradient(circle at 10% 20%, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(160, 82, 45, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(184, 134, 11, 0.08) 0%, transparent 70%);
}

/* Acuarela - Cool watery tones */
.gradient-acuarela {
    background:
        radial-gradient(circle at 15% 25%, rgba(64, 156, 189, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(135, 206, 235, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 149, 237, 0.08) 0%, transparent 70%);
}

/* Digital - Modern tech tones */
.gradient-digital {
    background:
        radial-gradient(circle at 20% 30%, rgba(123, 104, 238, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(147, 112, 219, 0.08) 0%, transparent 70%);
}

/* Regalos - Festive warm tones */
.gradient-regalos {
    background:
        radial-gradient(circle at 12% 22%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 88% 78%, rgba(255, 127, 80, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 165, 0, 0.08) 0%, transparent 70%);
}

/* Contacto - Professional teal tones */
.gradient-contacto {
    background:
        radial-gradient(circle at 18% 28%, rgba(0, 128, 128, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 82% 72%, rgba(72, 209, 204, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(32, 178, 170, 0.08) 0%, transparent 70%);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Category Grid (Home) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
}

.category-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    group: cursor-pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.category-card:hover .category-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.category-title {
    color: var(--white);
    font-size: 2.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.category-card:hover .category-title {
    transform: translateY(0);
    opacity: 1;
}

/* Art Gallery Grid (Inner Pages) */
.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.art-card {
    background: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius);
}

.art-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.art-image-wrapper {
    overflow: hidden;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    background: #f0f0f0;
    aspect-ratio: 1;
    cursor: zoom-in;
}

.art-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.art-image-wrapper:hover img {
    transform: scale(1.05);
}

.art-info {
    padding: var(--spacing-sm);
}

.art-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.art-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.art-price {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.footer-col a {
    color: #aaa;
}

.footer-col a:hover {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }

    .main-nav {
        display: none;
    }

    /* Needs mobile menu implementation or simple stack */

    /* Simple Mobile Menu Fallback */
    .site-header {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }

    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        display: block;
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
}