
:root {
    --background: #E8E9ED;
    --background-light: #F4F5F7;
    --card: #FFFFFF;
    --navy: #142943;
    --navy-light: #233D5E;
    --silver: #AEB7C4;
    --silver-light: #DCE0E6;
    --white: #FFFFFF;
    --text: #25364B;
    --muted: #687589;
    --border: #D8DDE5;
    --radius: 18px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    overflow-x: hidden;
}

.background-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at 15% 15%, #FFFFFF, transparent 40%), linear-gradient(135deg, #E4E7EC, #F5F6F8, #DDE1E8);
}

/* PORTADA */

.hero {
    min-height: 570px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    padding: 75px 20px 60px;
    background: radial-gradient(ellipse at center, #FFFFFF 0%, #EFF1F4 65%, #DCE1E8 100%);
    border-bottom: 3px solid var(--silver);
}

.hero-content {
    max-width: 760px;
    animation: fadeUp .9s ease both;
}

.wedding-symbol {
    color: var(--navy);
    font-size: 34px;
    margin-bottom: 15px;
}

.eyebrow {
    color: var(--navy);
    font-size: 10px;
    letter-spacing: 5px;
    font-weight: 600;
}

.hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(65px, 10vw, 110px);
    font-weight: 500;
    line-height: 1.1;
    margin: 20px 0;
    color: var(--navy);
}

.ampersand {
    color: #8291A5;
    font-style: italic;
}

.title-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0 25px;
}

    .title-divider span {
        height: 1px;
        width: 65px;
        background: var(--navy);
    }

    .title-divider i {
        color: var(--navy);
        font-size: 17px;
        font-style: normal;
    }

.hero-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 29px;
    color: var(--navy);
    margin-bottom: 12px;
}

.hero-description {
    color: #59677A;
    max-width: 560px;
    margin: auto;
    font-size: 13px;
    font-weight: 400;
    line-height: 2;
}

.hero-date {
    margin-top: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--navy);
    font-size: 9px;
    letter-spacing: 3px;
    font-weight: 600;
}

.date-line {
    width: 45px;
    height: 1px;
    background: var(--silver);
}

.hero-bottom {
    position: absolute;
    bottom: 15px;
    text-align: center;
    color: var(--navy);
    font-size: 8px;
    letter-spacing: 3px;
}

.scroll-indicator {
    font-size: 18px;
    color: var(--navy);
    margin-top: 5px;
}

/* CONTENEDOR */

.container {
    width: min(100% - 40px, 1000px);
    margin: 65px auto;
}

/* TARJETAS */

.card {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--border);
    border-top: 3px solid var(--navy);
    border-radius: var(--radius);
    padding: 38px;
    margin-bottom: 30px;
    box-shadow: 0 12px 35px rgba(20,41,67,.09);
    backdrop-filter: blur(12px);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 22px;
}

.section-number {
    font-family: 'Cormorant Garamond', serif;
    color: var(--navy);
    font-size: 35px;
    border-right: 1px solid var(--silver);
    padding-right: 17px;
}

.section-subtitle {
    display: block;
    font-size: 9px;
    letter-spacing: 3px;
    color: #65768E;
    font-weight: 600;
    margin-bottom: 3px;
}

.section-heading h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.2;
}

.card-description {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 28px;
}

/* FORMULARIO */

.form-group {
    margin-bottom: 25px;
}

    .form-group label {
        display: block;
        color: var(--navy);
        font-size: 11px;
        font-weight: 600;
        margin-bottom: 10px;
    }

    .form-group input {
        width: 100%;
        height: 49px;
        padding: 0 16px;
        border: 1px solid #CBD2DC;
        border-radius: 8px;
        outline: none;
        background: #F8F9FB;
        color: var(--navy);
        font-family: inherit;
        font-size: 12px;
        transition: .3s;
    }

        .form-group input:focus {
            border-color: var(--navy);
            box-shadow: 0 0 0 3px rgba(20,41,67,.08);
        }

        .form-group input::placeholder {
            color: #929DAC;
        }

/* ZONA DE CARGA */

.upload-zone {
    text-align: center;
    padding: 35px 20px;
    border: 1px dashed #8796AA;
    border-radius: 12px;
    background: linear-gradient(135deg, #F7F8FA, #EDF0F4);
    transition: .3s;
}

    .upload-zone:hover {
        border-color: var(--navy);
        background: #EEF2F7;
    }

.upload-icon {
    width: 65px;
    height: 65px;
    border: 1px solid var(--navy);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    color: var(--navy);
    font-size: 35px;
    background: #FFFFFF;
}

.upload-zone h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 25px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 8px;
}

.upload-zone p {
    color: #687589;
    font-size: 11px;
    margin-bottom: 22px;
}

/* BOTÓN */

.btn {
    border: 1px solid var(--navy);
    background: linear-gradient(135deg, #233D5E, #10243D);
    color: #FFFFFF;
    padding: 13px 28px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: .3s;
}

    .btn span {
        font-size: 17px;
        margin-right: 8px;
    }

    .btn:hover {
        transform: translateY(-3px);
        background: #345274;
        box-shadow: 0 8px 20px rgba(20,41,67,.2);
    }

.upload-formats {
    color: #7D899A;
    font-size: 8px;
    letter-spacing: 2px;
    margin-top: 18px;
}

/* PROGRESO */

.progress {
    display: none;
    width: 100%;
    height: 5px;
    margin-top: 22px;
    border-radius: 10px;
    overflow: hidden;
    background: #E1E5EB;
}

    .progress > div {
        width: 0;
        height: 100%;
        background: var(--navy);
        transition: width .3s;
    }

.status {
    margin-top: 12px;
    color: var(--navy);
    font-size: 12px;
}

.hint {
    color: var(--muted);
    font-size: 11px;
    margin-top: 8px;
}

.privacy-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding: 14px;
    border-radius: 7px;
    background: #EEF1F5;
    color: #5D6B7E;
    font-size: 10px;
    border-left: 3px solid var(--navy);
}

    .privacy-note span {
        color: var(--navy);
        font-size: 22px;
    }

/* GALERÍA */

#grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 25px;
    width: 100%;
}

    #grid .item {
        position: relative;
        aspect-ratio: 1 / 1; /* todas cuadradas */
        overflow: hidden;
        border-radius: 10px;
        cursor: pointer;
        background: #EEF0F4;
    }

        #grid .item img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover; /* recorta al centro, sin deformar */
            display: block;
        }

        #grid .item .play {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 42px;
            height: 42px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #fff;
            background: rgba(20, 41, 67, .8);
            border-radius: 50%;
            pointer-events: none;
        }

        #grid .item .del {
            position: absolute;
            top: 8px;
            right: 8px;
            z-index: 2;
            width: 30px;
            height: 30px;
            border: none;
            border-radius: 50%;
            background: rgba(20, 41, 67, .85);
            color: #fff;
            cursor: pointer;
        }

        #grid .item .tag {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            padding: .3rem .5rem;
            font-size: 11px;
            color: #fff;
            background: linear-gradient(transparent, rgba(0,0,0,.7));
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #grid .item.ph {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #grid .item.ph-video::before {
            content: "🎬";
            font-size: 2rem;
        }

        #grid .item.ph-image::before {
            content: "🖼️";
            font-size: 2rem;
        }

/* ESTADO VACÍO */

.empty {
    text-align: center;
    padding: 45px 15px;
}

.empty-icon {
    color: var(--navy);
    font-size: 48px;
    margin-bottom: 12px;
}

.empty h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--navy);
    font-size: 27px;
    font-weight: 500;
}

.empty p {
    color: var(--muted);
    font-size: 11px;
    margin-top: 7px;
}

.hidden {
    display: none !important;
}

/* FOOTER */

.footer {
    text-align: center;
    padding: 40px 20px 35px;
    border-top: 1px solid var(--silver);
    background: #F8F9FB;
}

.footer-heart {
    color: var(--navy);
    font-size: 20px;
}

.footer p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
    color: var(--navy);
}

.footer span {
    font-size: 8px;
    letter-spacing: 3px;
    color: #687589;
}

.footer-line {
    width: 55px;
    height: 1px;
    background: var(--navy);
    margin: 20px auto 0;
}

/* ANIMACIÓN */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* RESPONSIVE */

@media (max-width: 600px) {

    .hero {
        min-height: 530px;
        padding: 60px 20px;
    }

        .hero h1 {
            font-size: 65px;
        }

    .hero-message {
        font-size: 24px;
    }

    .hero-description {
        font-size: 11px;
    }

    .container {
        width: calc(100% - 24px);
        margin: 30px auto;
    }

    .card {
        padding: 23px 17px;
        margin-bottom: 18px;
    }

    .section-heading {
        gap: 12px;
    }

    .section-number {
        font-size: 29px;
        padding-right: 12px;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .upload-zone {
        padding: 28px 13px;
    }

        .upload-zone h3 {
            font-size: 22px;
        }

    .btn {
        padding: 13px 18px;
        font-size: 10px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gallery-count {
        font-size: 9px;
        padding: 4px 8px;
    }

    .footer {
        padding: 30px 15px;
    }
}


.wedding-symbol {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

    .wedding-symbol img {
        width: 110px;
        height: 110px;
        object-fit: contain;
        display: block;
    }

.hero-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 0 35px;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.scroll-text {
    font-size: 10px;
    letter-spacing: 4px;
    font-weight: 600;
    color: #142943;
    opacity: .75;
}

.scroll-circle {
    width: 48px;
    height: 48px;
    border: 1px solid #AEB7C4;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,.75);
    box-shadow: 0 5px 18px rgba(20,41,67,.12);
    animation: flechaBajar 1.8s infinite ease-in-out;
    transition: all .3s ease;
}

.scroll-arrow {
    font-size: 28px;
    color: #142943;
    line-height: 1;
    font-weight: 300;
}

.scroll-indicator:hover .scroll-circle {
    background: #142943;
    border-color: #142943;
    box-shadow: 0 8px 22px rgba(20,41,67,.25);
}

.scroll-indicator:hover .scroll-arrow {
    color: #fff;
}

@keyframes flechaBajar {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.optional {
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}




/* VISOR */
.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

    .viewer img, .viewer video {
        max-width: 100%;
        max-height: 100%;
        border-radius: 6px;
    }

.viewer-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

/* ADMIN */
.row {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn.secondary {
    background: transparent;
    color: var(--navy);
}

.btn {
    text-decoration: none;
    display: inline-block;
}

#login label {
    display: block;
    margin-bottom: .4rem;
}

#login input, #panel select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #CBD2DC;
    border-radius: 8px;
    background: #F8F9FB;
    font-family: inherit;
}

#panel select {
    width: auto;
}

#panel .card, #login {
    margin-bottom: 20px;
    padding: 20px;
}

body > header h1 {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    color: var(--navy);
    padding: 1.5rem 0 .5rem;
}

#grid {
    display: block;
    column-count: 2;
    column-gap: 12px;
}

    #grid .item {
        aspect-ratio: auto;
        break-inside: avoid;
        margin-bottom: 12px;
    }

        #grid .item img {
            position: static;
            height: auto;
        }

@media (min-width: 700px) {
    #grid {
        column-count: 3;
    }
}



/* VENTANA DE CONFIRMACIÓN */
.dlg-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(20, 41, 67, .55);
    backdrop-filter: blur(4px);
    animation: dlgFade .18s ease;
}

    .dlg-overlay.closing {
        opacity: 0;
        transition: opacity .15s;
    }

.dlg {
    width: min(100%, 380px);
    background: #fff;
    border-top: 3px solid var(--navy);
    border-radius: 18px;
    padding: 26px 24px 22px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(20, 41, 67, .35);
    animation: dlgPop .2s ease;
}

.dlg-img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 14px;
    box-shadow: 0 6px 18px rgba(20, 41, 67, .2);
}

.dlg h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 6px;
}

.dlg p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 22px;
}

.dlg-actions {
    display: flex;
    gap: 10px;
}

.dlg-btn {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: .2s;
}

.dlg-cancel {
    background: #fff;
    color: var(--navy);
    border: 1px solid #CBD2DC;
}

    .dlg-cancel:hover {
        background: #F1F3F7;
    }

.dlg-danger {
    background: #A83A3A;
    color: #fff;
    border: 1px solid #A83A3A;
}

    .dlg-danger:hover {
        background: #8F2F2F;
    }

/* Animación al quitar una foto de la galería */
#grid .item.removing {
    opacity: 0;
    transform: scale(.9);
    transition: .25s;
}

@keyframes dlgFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dlgPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}