/**
 * Estilos principales - Recuerdos de Boda
 * Juan Francisco & Guadalupe
 * Diseño profesional y responsive
 */

:root {
    --color-primary: #5a7a5a;
    --color-primary-light: #7a9a7a;
    --color-primary-dark: #4a6a4a;
    --color-accent: #d4a574;
    --color-accent-light: #e4c5a4;
    --color-accent-dark: #b48554;
    --color-white: #ffffff;
    --color-cream: #fdfcfa;
    --color-light: #f8f7f5;
    --color-gray-100: #f3f2f0;
    --color-gray-200: #e8e6e3;
    --color-gray-300: #d5d3d0;
    --color-gray-400: #a8a6a3;
    --color-gray-500: #7a7875;
    --color-text: #3a3a3a;
    --color-text-light: #5a5a5a;
    --color-text-muted: #8a8a8a;
    --color-success: #5a9a5a;
    --color-error: #c45a5a;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-cream);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}
h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
p { margin-bottom: 1rem; color: var(--color-text-light); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 640px) { .container, .container-narrow { padding: 0 1rem; } }

/* NAVBAR */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}
.navbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem; max-width: 1400px; margin: 0 auto; gap: 1rem;
}
.navbar-brand {
    font-family: var(--font-heading); font-size: 1.25rem; font-weight: 500;
    color: var(--color-primary-dark); white-space: nowrap;
}
.navbar-brand .ampersand { color: var(--color-accent); font-style: italic; margin: 0 4px; }
.navbar-menu {
    display: flex; align-items: center; gap: 0.5rem; list-style: none;
    flex-wrap: wrap; justify-content: flex-end;
}
.navbar-menu a {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
    color: var(--color-text); border-radius: var(--radius-md); transition: all 0.2s;
}
.navbar-menu a:hover { background: var(--color-gray-100); color: var(--color-primary); }
.navbar-menu a.active { background: var(--color-primary); color: white; }
.navbar-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 0.5rem; border-radius: var(--radius-md);
}
.navbar-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 5px 0; border-radius: 2px; transition: 0.2s; }

@media (max-width: 900px) {
    .navbar-menu {
        position: fixed; top: 0; right: -100%; width: 280px; max-width: 85vw; height: 100vh;
        background: var(--color-white); flex-direction: column; align-items: stretch;
        padding: 4rem 1.5rem 1.5rem; gap: 0.25rem; box-shadow: var(--shadow-lg);
        transition: right 0.3s; overflow-y: auto;
    }
    .navbar-menu.active { right: 0; }
    .navbar-menu a { padding: 1rem; font-size: 1rem; }
    .navbar-toggle { display: block; z-index: 1001; }
    .navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .navbar-toggle.active span:nth-child(2) { opacity: 0; }
    .navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}
@media (max-width: 480px) { .navbar-brand { font-size: 1rem; } }

/* BOTONES - PROFESIONALES */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; font-family: var(--font-body); font-size: 0.9375rem;
    font-weight: 500; line-height: 1.4; text-align: center; white-space: nowrap;
    cursor: pointer; border: 2px solid transparent; border-radius: var(--radius-full);
    transition: all 0.25s; text-decoration: none;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white; border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(90,122,90,0.25);
}
.btn-primary:hover {
    background: var(--color-primary-dark); transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(90,122,90,0.35); color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white; border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(212,165,116,0.25);
}
.btn-accent:hover {
    background: var(--color-accent-dark); transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212,165,116,0.35); color: white;
}

.btn-outline {
    background: transparent; color: var(--color-primary); border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: white; transform: translateY(-2px); }

.btn-light {
    background: var(--color-white); color: var(--color-text);
    border-color: var(--color-gray-200); box-shadow: var(--shadow-sm);
}
.btn-light:hover { background: var(--color-gray-100); border-color: var(--color-gray-300); }
.btn-light.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

.btn-ghost { background: transparent; color: var(--color-text-light); border-color: transparent; }
.btn-ghost:hover { background: var(--color-gray-100); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-xl { padding: 1.125rem 2.5rem; font-size: 1.125rem; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--radius-md); }
.btn-icon.btn-sm { width: 36px; height: 36px; }
.btn-block { display: flex; width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 480px) {
    .btn { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
    .btn-lg { padding: 0.875rem 1.5rem; font-size: 1rem; }
    .btn-group { width: 100%; }
    .btn-group .btn { flex: 1; }
}

/* HERO */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: calc(80px + 3rem) 1.5rem 3rem;
    background: linear-gradient(180deg, rgba(253,252,250,0.97), rgba(248,247,245,0.95));
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-names {
    font-family: var(--font-heading); font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400; color: var(--color-primary-dark); line-height: 1.15; margin-bottom: 1rem;
}
.hero-names .ampersand { display: block; font-size: 0.5em; color: var(--color-accent); font-style: italic; margin: 0.5rem 0; }
.hero-date { font-size: clamp(0.875rem, 2vw, 1rem); color: var(--color-accent-dark); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 2rem; font-weight: 500; }
.hero-message { font-size: clamp(1rem, 2.5vw, 1.2rem); color: var(--color-text-light); line-height: 1.8; max-width: 580px; margin: 0 auto 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stat { text-align: center; padding: 1rem; }
.hero-stat-number { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; color: var(--color-primary); display: block; line-height: 1; }
.hero-stat-label { font-size: 0.8125rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.25rem; }

@media (max-width: 640px) {
    .hero { padding-top: calc(70px + 2rem); }
    .hero-stats { gap: 1rem; }
    .hero-stat { flex: 1; min-width: 90px; padding: 0.5rem; }
}

/* SECTIONS */
.section { padding: 4rem 0; }
.section-alt { background: var(--color-white); }
.section-header { text-align: center; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-title { position: relative; display: inline-block; padding-bottom: 1rem; margin-bottom: 0.5rem; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light)); border-radius: 2px; }
.section-subtitle { font-size: 1.0625rem; color: var(--color-text-light); line-height: 1.7; }
@media (max-width: 640px) { .section { padding: 2.5rem 0; } }

/* CARDS */
.card { background: var(--color-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; transition: all 0.25s; }
.card:hover { box-shadow: var(--shadow-lg); }
.card-body { padding: 1.5rem; }

/* GALLERY */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.gallery-item { position: relative; border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--color-gray-100); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%); opacity: 0; transition: opacity 0.25s; display: flex; align-items: flex-end; padding: 1.5rem; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-actions { display: flex; gap: 0.5rem; }
.gallery-btn { width: 44px; height: 44px; border-radius: var(--radius-md); background: rgba(255,255,255,0.95); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--color-text); transition: all 0.2s; box-shadow: var(--shadow-sm); }
.gallery-btn:hover { background: var(--color-accent); color: white; transform: scale(1.05); }
.gallery-btn.is-favorite { background: var(--color-accent); color: white; }
.video-indicator { position: absolute; top: 1rem; left: 1rem; background: rgba(0,0,0,0.75); color: white; padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; display: flex; align-items: center; gap: 0.25rem; }

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .gallery-btn { width: 38px; height: 38px; font-size: 1rem; }
}
@media (max-width: 480px) {
    .gallery-grid { gap: 0.5rem; }
    .gallery-item { border-radius: var(--radius-md); }
    .gallery-overlay { padding: 0.75rem; }
    .gallery-btn { width: 34px; height: 34px; font-size: 0.9rem; }
}

/* FORMS */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--color-text); margin-bottom: 0.5rem; }
.form-control { width: 100%; padding: 0.875rem 1rem; font-family: var(--font-body); font-size: 1rem; color: var(--color-text); background: var(--color-white); border: 2px solid var(--color-gray-200); border-radius: var(--radius-md); transition: all 0.2s; }
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(90,122,90,0.1); }
.form-control::placeholder { color: var(--color-gray-400); }
textarea.form-control { min-height: 140px; resize: vertical; line-height: 1.6; }

/* UPLOAD ZONE */
.upload-zone { border: 2px dashed var(--color-gray-300); border-radius: var(--radius-xl); padding: 4rem 2rem; text-align: center; transition: all 0.25s; cursor: pointer; background: var(--color-light); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--color-primary); background: rgba(90,122,90,0.05); }
.upload-zone-icon { font-size: 3.5rem; color: var(--color-primary-light); margin-bottom: 1rem; }
.upload-zone-text { font-size: 1.0625rem; color: var(--color-text); margin-bottom: 0.5rem; }
.upload-zone-hint { font-size: 0.875rem; color: var(--color-text-muted); }
@media (max-width: 640px) { .upload-zone { padding: 2.5rem 1.5rem; } .upload-zone-icon { font-size: 2.5rem; } }

/* GUESTBOOK */
.guestbook-entry { background: var(--color-white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; position: relative; border-left: 4px solid var(--color-accent); }
.guestbook-entry::before { content: '"'; font-family: var(--font-heading); font-size: 4rem; color: var(--color-accent); opacity: 0.2; position: absolute; top: 0.5rem; left: 1rem; line-height: 1; }
.guestbook-message { font-size: 1.0625rem; line-height: 1.8; color: var(--color-text); padding-left: 2rem; font-style: italic; }
.guestbook-author { margin-top: 1rem; padding-left: 2rem; color: var(--color-primary); font-weight: 500; }
.guestbook-entry.featured { background: linear-gradient(to right, rgba(212,165,116,0.08), transparent); }

/* AUTH PAGES */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: linear-gradient(135deg, var(--color-cream), var(--color-light)); }
.auth-card { background: var(--color-white); padding: 2.5rem; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-title { font-family: var(--font-heading); font-size: 1.75rem; color: var(--color-primary-dark); margin-bottom: 0.5rem; }
.auth-subtitle { color: var(--color-text-light); font-size: 0.9375rem; }
.auth-divider { display: flex; align-items: center; margin: 2rem 0; color: var(--color-text-muted); font-size: 0.875rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-gray-200); }
.auth-divider span { padding: 0 1rem; }
@media (max-width: 480px) { .auth-card { padding: 1.5rem; } }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; opacity: 0; visibility: hidden; transition: all 0.25s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { max-width: 90vw; max-height: 90vh; position: relative; }
.modal-content img, .modal-content video { max-width: 100%; max-height: 85vh; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-close { position: fixed; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,0.1); border: none; color: white; font-size: 2rem; cursor: pointer; width: 50px; height: 50px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.2); }

/* ALERTS */
.alert { padding: 1rem 1.5rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; font-size: 0.9375rem; }
.alert-success { background: rgba(90,154,90,0.1); color: var(--color-success); border: 1px solid rgba(90,154,90,0.2); }
.alert-error { background: rgba(196,90,90,0.1); color: var(--color-error); border: 1px solid rgba(196,90,90,0.2); }
.alert-info { background: rgba(90,138,196,0.1); color: #5a8ac4; border: 1px solid rgba(90,138,196,0.2); }

/* FOOTER */
.footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding: 2.5rem 0 1.5rem; text-align: center; }
.footer-names { font-family: var(--font-heading); font-size: 1.5rem; color: var(--color-white); margin-bottom: 0.25rem; }
.footer-date { color: var(--color-accent-light); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.footer-heart { color: var(--color-accent); font-size: 1.5rem; animation: heartbeat 2s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.footer-copyright { font-size: 0.8125rem; margin-top: 1.5rem; opacity: 0.6; }

/* UTILITIES */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem; background: var(--color-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 2rem; }
@media (max-width: 640px) { .filter-bar { padding: 0.75rem; } .filter-bar .btn { flex: 1; min-width: calc(50% - 0.25rem); } }

.empty-state { text-align: center; padding: 4rem 1.5rem; }
.empty-state-icon { font-size: 4rem; color: var(--color-gray-300); margin-bottom: 1.5rem; }
.empty-state-title { font-size: 1.25rem; color: var(--color-text-light); margin-bottom: 0.5rem; }
.empty-state-text { color: var(--color-text-muted); margin-bottom: 1.5rem; }

.info-panel { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: var(--color-light); border-radius: var(--radius-md); margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 640px) { .info-panel { flex-direction: column; align-items: stretch; text-align: center; } }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--color-white); padding: 1.5rem; border-radius: var(--radius-lg); text-align: center; box-shadow: var(--shadow-sm); }
.stat-card-number { font-family: var(--font-heading); font-size: 2rem; font-weight: 500; color: var(--color-primary); line-height: 1; }
.stat-card-label { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.25rem; }
@media (max-width: 640px) { .stats-row { gap: 0.5rem; } .stat-card { padding: 1rem; } .stat-card-number { font-size: 1.5rem; } .stat-card-label { font-size: 0.75rem; } }

.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }
.preview-item { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1; background: var(--color-gray-200); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-item .remove-btn { position: absolute; top: 0.25rem; right: 0.25rem; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,0.7); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.preview-item .remove-btn:hover { background: var(--color-error); }
.preview-item .file-type { position: absolute; bottom: 0.25rem; left: 0.25rem; background: rgba(0,0,0,0.7); color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 500; }

.page-content { padding-top: 80px; }
@media (max-width: 640px) { .page-content { padding-top: 70px; } }

/* Media checkbox */
.media-checkbox { position: absolute; top: 10px; right: 10px; z-index: 10; width: 22px; height: 22px; cursor: pointer; accent-color: var(--color-primary); }
