/* ============================================
   ESTILOS GENERALES - FAMILIA FOKKELMAN
   ============================================ */

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

:root {
    --cream: #f5f1e8;
    --warm-brown: #8b7355;
    --deep-brown: #5c4a3a;
    --sage-green: #9caf88;
    --dusty-blue: #7d8c9e;
    --soft-gold: #c9a961;
    --charcoal: #3d3d3d;
    --light-cream: #faf8f3;
}

body {
    font-family: 'Georgia', 'Palatino', 'Times New Roman', serif;
    background: linear-gradient(to bottom, #e8dfd0 0%, #d4c4b0 100%);
    min-height: 100vh;
    color: var(--charcoal);
}

/* ============================================
   NAVEGACIÓN
   ============================================ */

nav {
    background: rgba(250, 248, 243, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(61, 61, 61, 0.08);
    border-bottom: 2px solid var(--soft-gold);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--deep-brown);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

nav a:hover,
nav a.active {
    background: var(--warm-brown);
    color: var(--light-cream);
}

.journey-count {
    background: var(--soft-gold);
    color: var(--deep-brown);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.3rem;
}

/* ============================================
   GALERÍA - BOTONES DE ACCIONES
   ============================================ */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem 0.5rem 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s;
}

.gallery-item:hover .photo-actions {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   GALERÍA - BOTONES DE ACCIONES
   ============================================ */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(61, 61, 61, 0.15);
    background: var(--light-cream);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(61, 61, 61, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(92, 74, 58, 0.92), transparent);
    padding: 1rem 0.5rem 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.gallery-item:hover .photo-actions {
    opacity: 1;
    transform: translateY(0);
}

.photo-actions button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: Georgia, serif;
}

.btn-add-journey {
    background: var(--sage-green);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-add-journey:hover:not(:disabled) {
    background: #8a9e76;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-add-journey:disabled {
    background: var(--dusty-blue);
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-delete {
    background: var(--warm-brown);
    color: var(--light-cream);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-delete:hover {
    background: var(--deep-brown);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Botones de navegación de paginación */
.btn-nav {
    background: var(--dusty-blue);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    font-family: Georgia, serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(61, 61, 61, 0.15);
}

.btn-nav:hover:not(:disabled) {
    background: #6d7b8d;
    box-shadow: 0 3px 10px rgba(61, 61, 61, 0.25);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #a8b0b8;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

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

.page-section {
    display: none;
    animation: fadeIn 0.5s;
}

.page-section.active {
    display: block;
}

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

/* ============================================
   PÁGINA INICIO (DEDICATORIA)
   ============================================ */

.dedicatoria-card {
    background: var(--light-cream);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 8px 24px rgba(61, 61, 61, 0.15);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    border: 3px solid var(--soft-gold);
}

.dedicatoria-card h1 {
    font-size: 2.8rem;
    color: var(--deep-brown);
    margin-bottom: 1rem;
    font-family: 'Brush Script MT', 'Georgia', cursive;
    font-weight: normal;
}

.dedicatoria-card .subtitle {
    font-size: 1.2rem;
    color: var(--warm-brown);
    margin-bottom: 2rem;
    font-style: italic;
}

.dedicatoria-text {
    font-size: 1.15rem;
    line-height: 1.9;
    text-align: left;
    margin: 2rem 0;
    color: var(--charcoal);
}

.heart-decoration {
    font-size: 2.5rem;
    color: var(--warm-brown);
    margin: 2rem 0;
    opacity: 0.8;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   RECORRIDO
   ============================================ */

.photo-journey {
    display: grid;
    gap: 3rem;
}

.photo-item {
    background: var(--light-cream);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(61, 61, 61, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(201, 169, 97, 0.3);
}

.photo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(61, 61, 61, 0.18);
}

.photo-container {
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 115, 85, 0.2);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-container img:hover {
    transform: scale(1.02);
}

.photo-info {
    display: grid;
    gap: 1rem;
}

.info-display {
    padding: 1rem;
    background: var(--cream);
    border-radius: 6px;
    min-height: 60px;
    border: 1px solid rgba(139, 115, 85, 0.2);
}

.info-display.empty {
    font-style: italic;
    color: var(--warm-brown);
    opacity: 0.7;
}

.info-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--deep-brown);
}

.input-group input,
.input-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--warm-brown);
    border-radius: 6px;
    font-size: 1rem;
    font-family: Georgia, serif;
    background: var(--light-cream);
    color: var(--charcoal);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--soft-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-save {
    background: var(--sage-green);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(61, 61, 61, 0.15);
}

.btn-save:hover {
    background: #8a9e76;
    box-shadow: 0 5px 14px rgba(61, 61, 61, 0.22);
}

.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botón eliminar en recorrido */
.btn-delete {
    background: var(--warm-brown);
    color: var(--light-cream);
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(61, 61, 61, 0.15);
}

.btn-delete:hover {
    background: var(--deep-brown);
    box-shadow: 0 5px 14px rgba(61, 61, 61, 0.22);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn-nav {
    background: var(--light-cream);
    color: var(--deep-brown);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--warm-brown);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: var(--warm-brown);
    color: var(--light-cream);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   GALERÍA
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botones de acción de la galería */
.gallery-item-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem 0.5rem 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.btn-gallery-action {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

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

.btn-add-journey:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.btn-add-journey.in-journey {
    background: #10b981;
}

.btn-delete-photo {
    background: #ef4444;
    color: white;
}

.btn-delete-photo:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 74, 58, 0.96);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--light-cream);
    color: var(--deep-brown);
    border: 2px solid var(--soft-gold);
    padding: 0.8rem 1.3rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--soft-gold);
    color: var(--deep-brown);
}

/* ============================================
   ENCABEZADOS DE SECCIÓN
   ============================================ */

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--deep-brown);
    margin-bottom: 0.5rem;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--warm-brown);
    font-style: italic;
}

/* ============================================
   ALBUM - TARJETAS Y BOTONES
   ============================================ */

.album-card {
    background: var(--light-cream);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(61, 61, 61, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(61, 61, 61, 0.18);
}

.album-img-container {
    height: 400px;
    overflow: hidden;
    cursor: pointer;
    background: var(--cream);
}

.album-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--cream);
}

.album-info {
    padding: 1.5rem;
}

.album-photo-number {
    color: var(--deep-brown);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.album-no-info {
    color: var(--warm-brown);
    font-style: italic;
    opacity: 0.7;
}

.album-btn-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-add-new-photo {
    background: var(--soft-gold);
    color: var(--deep-brown);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: Georgia, serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.btn-add-new-photo:hover {
    background: #b89a4f;
    box-shadow: 0 6px 16px rgba(201, 169, 97, 0.4);
    transform: translateY(-2px);
}

.btn-edit-album {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: Georgia, serif;
    background: var(--sage-green);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(61, 61, 61, 0.15);
}

.btn-edit-album:hover {
    background: #8a9e76;
    box-shadow: 0 3px 10px rgba(61, 61, 61, 0.25);
    transform: translateY(-2px);
}

.btn-delete-album {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: Georgia, serif;
    background: var(--warm-brown);
    color: var(--light-cream);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(61, 61, 61, 0.15);
}

.btn-delete-album:hover {
    background: var(--deep-brown);
    box-shadow: 0 3px 10px rgba(61, 61, 61, 0.25);
    transform: translateY(-2px);
}

/* Modal de edición */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 74, 58, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

@keyframes fadeInModal {
    to {
        opacity: 1;
    }
}

.edit-modal-content {
    background: var(--light-cream);
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    border: 2px solid var(--soft-gold);
    transform: scale(0.9);
    animation: scaleInModal 0.3s forwards;
}

@keyframes scaleInModal {
    to {
        transform: scale(1);
    }
}

.edit-modal h3 {
    color: var(--deep-brown);
    margin-bottom: 1.5rem;
}

.edit-modal-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-save-edit {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: Georgia, serif;
    background: var(--sage-green);
    color: white;
    transition: all 0.3s ease;
}

.btn-save-edit:hover {
    background: #8a9e76;
}

.btn-cancel-edit {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: Georgia, serif;
    background: var(--dusty-blue);
    color: white;
    transition: all 0.3s ease;
}

.btn-cancel-edit:hover {
    background: #6d7b8d;
}

/* ============================================
   RECORRIDO - ELEMENTOS
   ============================================ */

.journey-photo-item {
    background: var(--light-cream);
    padding: 2rem;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(61, 61, 61, 0.12);
    border: 2px solid rgba(201, 169, 97, 0.3);
}

.journey-photo-container {
    margin-bottom: 2rem;
}

.journey-photo-img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
}

.journey-info-div {
    margin-bottom: 2rem;
}

.journey-title {
    color: var(--deep-brown);
    margin-bottom: 1rem;
    font-weight: 600;
}

.journey-btn-container {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-journey {
    flex: 1;
    background: var(--dusty-blue);
    color: white;
}

.btn-edit-journey:hover {
    background: #6d7b8d;
}

.journey-nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Mensajes de estado */
.empty-state {
    background: var(--light-cream);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(61, 61, 61, 0.1);
    border: 2px solid rgba(201, 169, 97, 0.3);
}

.empty-state h3 {
    color: var(--deep-brown);
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    font-size: 1.05rem;
    color: var(--charcoal);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.empty-state a {
    color: var(--warm-brown);
    font-weight: 600;
    text-decoration: none;
}

.empty-state a:hover {
    color: var(--deep-brown);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .dedicatoria-card {
        padding: 2rem 1.5rem;
    }

    .dedicatoria-card h1 {
        font-size: 2rem;
    }

    .dedicatoria-text {
        font-size: 1rem;
    }

    .photo-container {
        height: 300px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}
