/*
Theme Name: Canalejas del Arroyo
Theme URI: https://canalejasdelarroyo.org
Author: Toni y Ángel
Author URI: https://canalejasdelarroyo.org
Description: Web personal dedicada a la historia, fotografías y comunidad de Canalejas del Arroyo.
Version: 1.0.0
Text Domain: canalejas
*/

:root {
    --primary: #c0392b;
    --primary-dark: #a93226;
    --secondary: #f39c12;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --text: #333;
    --text-muted: #666;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, .playfair {
    font-family: 'Playfair Display', serif;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

.section.bg-light {
    background-color: var(--light);
}

/* Header & Nav */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

#main-header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Playfair Display', serif;
}

.logo span {
    color: var(--primary);
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('assets/hero-canalejas.jpg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(192, 57, 43, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* Story Section */
.section-header {
    margin-bottom: 4rem;
}

.section-header.centered {
    text-align: center;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.accent-line {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-bottom: 2rem;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.story-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem !important;
    color: var(--primary) !important;
    border-left: 4px solid var(--primary);
    padding-left: 2rem;
    margin-top: 2rem;
}

.story-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: var(--light);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.view-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-link::after {
    content: '→';
}

/* Community Card */
.community-card {
    background: var(--dark);
    color: var(--white);
    border-radius: 30px;
    padding: 5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.community-card h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.community-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.social-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
}

.social-btn:hover {
    background: var(--white);
    color: var(--dark);
}

.community-cta {
    background: var(--primary);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
}

.community-cta h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.community-cta p {
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Footer */
.main-footer {
    background: var(--light);
    padding: 50px 0;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo .logo {
    margin-bottom: 0.5rem;
}

.footer-info {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards ease-out;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .story-grid, .community-card { grid-template-columns: 1fr; gap: 3rem; }
    .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .gallery-item.large { grid-column: span 2; height: 400px; }
    .gallery-item { height: 300px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .subtitle { font-size: 1.1rem; }
    .section { padding: 60px 0; }
    .community-card { padding: 3rem 2rem; }
    .footer-content { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-info { text-align: center; }
}
