/* Fuente White Star */
@font-face {
    font-family: 'White Star';
    src: url('../fonts/whitestar.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Fuente Handelson */
@font-face {
    font-family: 'Handelson';
    src: url('../fonts/handelson.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Variables de color */
:root {
    --color-primary: #8b5a4b;
    --color-secondary: #a78a7f;
    --color-light: #f9f3f0;
    --color-accent: #d4a59a;
}

/* Estilos generales */
body {
    font-family: 'Verdana', sans-serif;
    background-color: var(--color-light);
    color: #333;
    min-height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="rgba(139, 90, 75, 0.06)" d="M20,20 C40,0 60,0 80,20 C100,40 100,60 80,80 C60,100 40,100 20,80 C0,60 0,40 20,20 Z"></path></svg>');
    background-attachment: fixed;
    background-size: 400px;
    position: relative;
    padding-bottom: 80px;
    -webkit-tap-highlight-color: transparent;
}

.titulos {
    font-family: 'Handelson', sans-serif;
    font-size: 3.2rem;
    color: var(--color-primary);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    font-weight: normal;
    display: block;
}

.subtitulos {
    font-family: 'Handelson', sans-serif;
    font-size: 1.9rem;
    color: black;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    font-weight: normal;
    display: block;
}

/* Difuminado del 94% */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 243, 240, 0.94);
    z-index: -1;
}

/* Logo de la boda */
.wedding-logo {
    max-width: 80px;
    height: auto;
    margin: 0 10px;
    vertical-align: baseline;
}

/* Imagen de cabecera */
.header-image {
    max-width: 70%;
    height: auto;
    margin: 20px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Título */
.wedding-title {
    font-family: 'White Star', cursive;
    font-size: 3.5rem;
    color: var(--color-primary);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.titulogracias {
    font-family: 'White Star', cursive;
    font-size: 2.5rem;
    color: var(--color-primary);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.wedding-date {
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--color-secondary);
    margin-top: 1rem;
    margin-bottom: 1.8rem;
    font-family: 'White Star', cursive;
}

/* Divisor personalizado */
.divider-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
}

.divider-custom-line {
    width: 100%;
    max-width: 7rem;
    height: 0.07rem;
    background-color: var(--color-secondary);
}

.divider-custom-icon {
    color: var(--color-primary);
    font-size: 1.5rem;
    padding: 0 1rem;
}

/* Estilos para las instrucciones */
.instruction-steps {
    margin-bottom: 2rem !important;
}

.step-card {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 90, 75, 0.1);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.step-number {
    font-size: 2.0rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-family: 'White Star', cursive;
}

.step-text {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.step-icon {
    font-size: 2rem;
    color: var(--color-secondary);
}

/* Área de subida */
.upload-area {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(139, 90, 75, 0.1);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

.upload-content {
    padding: 2rem;
    border: 2px dashed var(--color-secondary);
    border-radius: 0.5rem;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.upload-content:hover {
    border-color: var(--color-primary);
    background-color: rgba(139, 90, 75, 0.03);
}

.upload-prompt {
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-prompt i {
    margin-bottom: 1rem;
}

.file-preview {
    display: none;
}

#previewContainer {
    position: relative;
}

#previewImage,
#previewVideo {
    max-width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

#previewVideo {
    width: 100%;
    height: auto;
}

/* Preview de múltiples archivos */
.preview-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 2px solid var(--color-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.preview-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

.video-thumbnail-preview {
    background-color: rgba(139, 90, 75, 0.1);
    border: 2px dashed var(--color-secondary);
    border-radius: 8px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    text-align: center;
    padding: 10px;
    overflow: hidden;
}

.video-thumbnail-preview i {
    font-size: 2rem;
    margin-bottom: 5px;
}

.video-thumbnail-preview span {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Botón ovalado */
.btn-ovalado {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    margin-top: 1rem;
}

.btn-ovalado:hover {
    background-color: var(--color-secondary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 90, 75, 0.3);
}

.btn-ovalado:active {
    transform: translateY(0);
}

.btn-ovalado:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline-wedding {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

/* Galería */
.gallery-section {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(139, 90, 75, 0.3);
    z-index: 1;
}

/* Estilos para vídeos en la galería */
.video-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 3px solid white;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.video-thumbnail:hover .video-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Lightbox personalizado */
.lightbox .lb-image {
    border: 10px solid white;
    border-radius: 3px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

.lb-data .lb-caption {
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.lb-close {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>') no-repeat center center;
    background-size: 24px;
    width: 40px;
    height: 40px;
    top: 20px;
    right: 20px;
}

/* Botonera flotante */
.floating-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.floating-btn {
    border: none;
    background: transparent;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.floating-btn i {
    font-size: 1.3rem;
    margin-right: 8px;
}

.floating-btn span {
    font-weight: 500;
}

/* Footer */
footer {
    color: var(--color-secondary);
    font-size: 0.9rem;
    margin-top: 3rem;
}

/* Badge para contador */
.badge.bg-wedding {
    background-color: var(--color-primary);
    color: white;
    font-weight: normal;
    padding: 5px 10px;
}

/* Mensaje de éxito en subida */
.upload-success-message {
    background-color: rgba(139, 90, 75, 0.1);
    border-left: 4px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 5px;
    padding: 10px 15px;
    margin-top: 15px;
    text-align: center;
}

.upload-success-message i {
    color: var(--color-primary);
    margin-right: 8px;
}

/* Paginación */
.pagination .page-link {
    color: var(--color-primary);
    border: 1px solid var(--color-secondary);
    margin: 0 3px;
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination .page-link:hover {
    background-color: var(--color-light);
    color: var(--color-primary);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Fix para Safari */
input[type="file"] {
    -webkit-appearance: none;
    appearance: none;
}

/* Responsive */
@media (max-width: 768px) {
    .wedding-title {
        font-size: 2.8rem;
    }

    .wedding-logo {
        max-width: 60px;
    }

    .header-image {
        max-width: 90%;
    }

    .floating-btn span {
        display: none;
    }

    .floating-btn i {
        margin-right: 0;
        font-size: 1.5rem;
    }

    .step-number {
        font-size: 2rem;
    }

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

    .upload-area {
        padding: 1.5rem;
    }

    .preview-thumbnail,
    .video-thumbnail-preview {
        height: 100px;
    }
}

@media (max-width: 576px) {
    .wedding-title {
        font-size: 2.2rem;
    }

    .wedding-logo {
        max-width: 50px;
    }

    .step-card {
        padding: 15px;
    }

    .step-number {
        font-size: 1.8rem;
    }

    .step-icon {
        font-size: 1.5rem;
    }

    .upload-content {
        padding: 1.5rem;
    }

    .preview-thumbnail,
    .video-thumbnail-preview {
        height: 80px;
    }

    .btn-ovalado {
        padding: 0.6rem 1.5rem;
        min-width: auto;
    }
}