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

html {
    /* Prevent font scaling on orientation change */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: #f8f8f8;
    background-image: url('fondo.jpg');
    background-size: 60% auto;
    background-position: center top;
    background-repeat: repeat;
    background-attachment: scroll;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 15%, rgba(255, 255, 255, 0.7) 25%, rgba(255, 255, 255, 0.7) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ========================
   MOBILE FIRST (< 768px)
   ======================== */

/* Navbar - Mobile */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar,
.hero,
.main-content,
.footer {
    position: relative;
    z-index: 1;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 15px;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #7a7a7a;
    font-family: 'Julius Sans One', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    padding: 8px 5px;
    /* Better tap targets */
    min-height: 44px;
    /* iOS recommended min touch target */
    display: flex;
    align-items: center;
}

.nav-links a:hover,
.nav-links a:active {
    color: #333;
}

/* Hero Section - Mobile */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 50px;
    z-index: 10;
}

.hero-content {
    width: 100%;
    max-width: 500px;
}

.couple-photo {
    position: relative;
    width: 100%;
    margin: 0 auto;
    /* Marco blanco estilo polaroid */
    background: white;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.couple-photo::before {
    /* Fondo gris azulado detrás de la polaroid - mismo color que cabeceras */
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-color: rgba(130, 150, 155, 0.9);
    z-index: -1;
    border-radius: 4px;
}

.couple-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.wedding-info {
    text-align: center;
    color: #333;
    padding: 15px 10px 10px;
    background: white;
}

.couple-names {
    font-family: 'Julius Sans One', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.wedding-date {
    font-family: 'Julius Sans One', sans-serif;
    font-size: 13px;
    letter-spacing: 1.5px;
}

.countdown {
    font-family: 'Julius Sans One', sans-serif;
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.9;
}

/* Main Content - Mobile */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.section-title {
    font-family: 'Julius Sans One', sans-serif;
    text-align: center;
    font-size: 16px;
    letter-spacing: 2px;
    margin: 40px 0 20px;
    text-transform: uppercase;
    color: #444;
}

/* Estilos para inputs y textareas */
input,
textarea,
select {
    font-family: 'Cormorant Garamond', serif;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

input::placeholder,
textarea::placeholder {
    text-transform: uppercase;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 1px;
}

/* ========================
   TABLET (768px - 1024px)
   ======================== */
@media (min-width: 768px) {
    .navbar {
        padding: 15px 0;
    }

    .nav-links {
        justify-content: flex-end;
        padding: 0 30px;
        gap: 25px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .hero {
        padding: 40px 30px 60px;
    }

    .hero-content {
        max-width: 450px;
    }

    .couple-names {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .wedding-info {
        padding: 35px 25px 25px;
    }

    .main-content {
        padding: 0 20px 80px;
    }

    .section-title {
        font-size: 17px;
        letter-spacing: 3px;
        margin: 50px 0 25px;
    }
}

/* ========================
   DESKTOP (> 1024px)
   ======================== */
@media (min-width: 1024px) {
    .nav-links {
        padding: 0 40px;
        gap: 30px;
    }

    .hero {
        padding: 50px 40px 80px;
    }

    .hero-content {
        max-width: 500px;
    }

    .couple-names {
        font-size: 32px;
        letter-spacing: 5px;
    }

    .wedding-date {
        font-size: 16px;
    }

    .countdown {
        font-size: 12px;
    }

    .section-title {
        font-size: 18px;
        margin: 60px 0 30px;
    }
}

/* ========================
   CARD SYSTEM - Mobile First
   ======================== */
.card {
    background: none;
    margin-bottom: 15px;
}

.card.full-width {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.card-header {
    background-color: rgba(130, 150, 155, 0.75);
    padding: 14px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    min-height: 52px;
    border-radius: 0;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.card-header h2 {
    font-family: 'Julius Sans One', sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-body {
    background: rgba(255, 255, 255, 0.7);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    padding: 0;
    border-radius: 0 0 4px 4px;
}

.card-header.active+.card-body {
    padding: 20px 15px;
    opacity: 1;
}

.icon-chevron {
    transition: transform 0.3s ease;
    display: inline-block;
    flex-shrink: 0;
    color: #fff;
}

.card-footer {
    display: none !important;
}

/* Grid System - Mobile First (single column) */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
}

.grid-container>.card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Forzar que el card-header ocupe todo y tenga altura automática igual */
.grid-container>.card>.card-header {
    flex: 0 0 auto;
}

/* Tablet: 2 columns */
@media (min-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Desktop: 3 columns */
@media (min-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        align-items: start;
    }

    /* Las cards en grid ocupan su columna, no todo el ancho */
    .grid-container>.card {
        width: 100%;
    }

    /* 1 elemento solo en última fila: columna central */
    .grid-container>.card:last-child:nth-child(3n+1) {
        grid-column: 2;
    }

    /* 2 elementos en última fila: columnas 1 y 2 (izquierda y centro) */
    .grid-container>.card:nth-last-child(2):nth-child(3n+1) {
        grid-column: 1;
    }

    .grid-container>.card:last-child:nth-child(3n+2) {
        grid-column: 2;
    }

    .card {
        margin-bottom: 15px;
    }

    .card.full-width {
        max-width: 100%;
    }

    .card-header {
        padding: 15px 20px;
    }

    .card-header h2 {
        font-size: 14px;
        letter-spacing: 2px;
        gap: 10px;
    }

    .card-body {
        background: rgba(255, 255, 255, 0.7);
        padding: 0;
    }

    .card-header.active+.card-body {
        padding: 25px 20px;
    }
}

/* Typography & Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.uppercase-text {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-8 {
    margin-bottom: 32px;
}

.py-4 {
    padding-top: 16px;
    padding-bottom: 16px;
}

.font-serif {
    font-family: 'Cormorant Garamond', serif;
}

.text-lg {
    font-size: 18px;
}

/* Specific Elements */
.illustration {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.illustration-wide {
    max-width: 80%;
    height: auto;
    margin-bottom: 30px;
}

.description-text {
    font-size: 13px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-highlight {
    font-weight: bold;
    margin: 15px 0;
    font-size: 14px;
}

.note-text {
    font-style: italic;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

/* Buttons - Mobile First */
.btn-primary {
    background-color: #37474f;
    color: white;
    border: none;
    padding: 14px 25px;
    font-family: 'Julius Sans One', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.3s;
    min-height: 48px;
    /* Better touch target */
    width: 100%;
    max-width: 280px;
    display: block;
    margin: 0 auto;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.btn-primary:hover,
.btn-primary:active {
    background-color: #263238;
}

@media (min-width: 768px) {
    .btn-primary {
        padding: 12px 30px;
        width: auto;
        max-width: none;
        display: inline-block;
    }
}

/* Checkboxes - Mobile First */
.checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-top: 20px;
}

.checkbox-group.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.checkbox-group label {
    font-family: 'Julius Sans One', sans-serif;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-transform: uppercase;
    padding: 8px 0;
    min-height: 44px;
    /* iOS recommended touch target */
    -webkit-tap-highlight-color: transparent;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border: 2px solid #999;
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #37474f;
}

@media (min-width: 768px) {
    .checkbox-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .checkbox-group.vertical {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}

/* Lists */
.stops-list p,
.hotel-list p,
.salon-list p,
.places-list p {
    font-size: 13px;
    margin-bottom: 5px;
}

.salon-name,
.hotel-name {
    text-decoration: underline;
    margin-bottom: 2px !important;
}

.address,
.phone {
    font-size: 12px !important;
    color: #555;
    margin-bottom: 2px !important;
}

.category {
    font-family: 'Julius Sans One', sans-serif;
    font-weight: bold;
    margin-bottom: 10px !important;
}

ul {
    list-style: none;
    padding-left: 10px;
    margin-bottom: 20px;
}

ul li::before {
    content: "•";
    color: #333;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* ========================
   SPECIAL MOBILE COMPONENTS
   ======================== */

/* Size selector grid - always horizontal */
.checkbox-group.sizes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.checkbox-group.sizes label {
    min-width: 50px;
    justify-content: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Scroll indicator animation */
.scroll-indicator {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.scroll-indicator .arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    animation: scrollBounce 1.5s infinite;
    opacity: 0;
}

.scroll-indicator .arrow:nth-child(1) {
    animation-delay: 0s;
}

.scroll-indicator .arrow:nth-child(2) {
    animation-delay: 0.15s;
    margin-top: -5px;
}

@keyframes scrollBounce {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(0, 0);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

/* Safe area for notch/home indicator on iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
}

/* Prevent horizontal scroll on mobile */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Better text readability on mobile */
@media (max-width: 767px) {
    .description-text {
        font-size: 12px;
        line-height: 1.5;
    }

    .uppercase-text {
        font-size: 12px;
        line-height: 1.6;
    }

    .location-highlight {
        font-size: 13px;
    }

    .note-text {
        font-size: 11px;
    }

    /* Make images responsive */
    .illustration,
    .ceremony-image img {
        max-width: 200px;
    }

    .illustration-wide {
        max-width: 100%;
    }

    /* Better touch feedback */
    .card-header:active {
        background-color: #a0aeb5;
    }
}

/* Gallery Buttons */
.gallery-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.gallery-buttons .btn-primary {
    width: auto;
    max-width: none;
    display: inline-block;
    margin: 0;
}

/* Message Section */
.message-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

/* Links styling */
a {
    color: #5a7a6a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Account number styling */
.account-number {
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 4px;
    display: inline-block;
}