/* XV Diana Sofía - Custom Styles for Dimension Theme */

/* Force content to be visible immediately - don't wait for video */
body.is-preload #header {
    display: flex !important;
    opacity: 1 !important;
}

body.is-preload #header > * {
    opacity: 1 !important;
    transform: none !important;
}

body.is-preload #header .content .inner {
    max-height: none !important;
    opacity: 1 !important;
}

body.is-preload #footer {
    opacity: 1 !important;
    transform: none !important;
}

/* Custom wave logo */
#header .logo img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

#header .logo svg {
    width: 100%;
    height: 100%;
}

/* Image sizing with 16:9 aspect ratio */
#main article .image.main {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2rem auto;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

#main article .image.main img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Countdown Timer */
.countdown {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.countdown-item {
    text-align: center;
    min-width: 60px;
}

.countdown-item span {
    display: block;
}

.countdown-item span:first-child {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.countdown-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 0.3rem;
    letter-spacing: 0.1em;
}

/* Event Date */
.event-date {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0.5rem 0;
    letter-spacing: 0.05em;
}

/* Event Details */
.event-details {
    margin: 2rem 0;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.detail-item i {
    font-size: 1.5rem;
    color: #ffffff;
    opacity: 0.7;
    width: 30px;
}

.detail-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

/* Dress Code Sections */
.dress-code-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.dress-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gender-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gender-header h3 {
    margin: 0;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dress-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dress-do, .dress-dont {
    padding: 1rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
}

.dress-do h4, .dress-dont h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.dress-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dress-requirements li {
    padding: 0.5rem 0;
    line-height: 1.6;
}

/* Responsive para Dress Code */
@media screen and (max-width: 968px) {
    .dress-code-container {
        grid-template-columns: 1fr;
    }
    
    .dress-requirements {
        grid-template-columns: 1fr;
    }
}

/* Note */
.note {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    margin: 2rem 0;
    font-style: italic;
}

/* RSVP Form Enhancements */
.box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.box p {
    margin: 0.5rem 0;
}

#guest-fields {
    margin-top: 1.5rem;
}

.guest-entry {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-entry h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.guest-entry .fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Success Message */
#success-message {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

#success-message h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #1e1e1e;
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 650px;
    position: relative;
    animation: slideIn 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s;
}

.close:hover {
    color: #fff;
}

.transfer-details {
    margin-top: 1.5rem;
}

.bank-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.bank-info p {
    margin: 0.8rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.mini-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.mini-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.privacy-note {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button overrides for better visibility */
.button.primary {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.button.primary:hover {
    background-color: #ffffff;
    color: #1e1e1e !important;
}

nav ul li a.primary {
    border-color: #ffffff;
    color: #ffffff !important;
}

nav ul li a.primary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Form field adjustments */
input[type="text"],
input[type="email"],
select,
textarea {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.25);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 1px #ffffff;
}

/* Responsive adjustments */
@media screen and (max-width: 736px) {
    .countdown {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .countdown-item {
        min-width: 60px;
    }
    
    .countdown-item span:first-child {
        font-size: 1.5rem;
    }
    
    .dress-code-grid {
        grid-template-columns: 1fr;
    }
    
    .guest-entry .fields {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .countdown-item span:first-child,
    .detail-item strong,
    h1, h2, h3 {
        color: #ffffff;
    }
    
    .button {
        border: 2px solid currentColor;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 10001;
    animation: slideIn 0.3s;
}

/* Video Background - Override Dimension theme */
#bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 1 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    /* Override theme background */
    background-image: none !important;
    background-color: #000 !important;
    transform: none !important;
    transition: none !important;
}

#bg::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/overlay.png');
    background-size: cover;
    z-index: 3;
    opacity: 0.5;
}

#bg::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(114, 97, 147, 0.25) 25%, rgba(227, 123, 124, 0.25) 75%);
    z-index: 4;
}

#bg-video {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    width: auto !important;
    height: auto !important;
    transform: translate(-50%, -50%) !important;
    object-fit: cover !important;
    z-index: 1 !important;
}

.bg-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 5 !important;
}

/* Asegurar que el wrapper esté por encima del video */
#wrapper {
    position: relative !important;
    z-index: 10 !important;
}

/* Ajustar opacidad del overlay para diferentes secciones si es necesario */
@media screen and (max-width: 736px) {
    .bg-overlay {
        background: rgba(0, 0, 0, 0.6); /* Más oscuro en móviles para mejor contraste */
    }
}

/* Optimización de rendimiento para el video */
@media (prefers-reduced-motion: reduce) {
    #bg-video {
        display: none;
    }
    
    #bg {
        background-image: url('/xv/images/bg.jpg');
        background-size: cover;
        background-position: center;
    }
}