/* ================================================
   DRESS CODE - OCEAN TWILIGHT DARK ELEGANTE
   ================================================ */

.dresscode {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 120px 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Efectos de fondo marino */
.dresscode::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(115, 191, 184, 0.06) 0%,
        rgba(95, 168, 211, 0.03) 50%,
        transparent 70%
    );
    animation: waveRotate 35s linear infinite;
    pointer-events: none;
    z-index: 1;
}

.dresscode::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(115, 191, 184, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(168, 218, 220, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

@keyframes waveRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Círculos flotantes decorativos */
.dresscode .floating-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(115, 191, 184, 0.08), 
        rgba(95, 168, 211, 0.04));
    pointer-events: none;
    z-index: 1;
    animation: floatCircle 25s ease-in-out infinite;
    border: 1px solid rgba(115, 191, 184, 0.08);
}

.dresscode .floating-circle:nth-child(1) {
    width: 180px;
    height: 180px;
    top: 15%;
    left: -90px;
    animation-duration: 28s;
}

.dresscode .floating-circle:nth-child(2) {
    width: 140px;
    height: 140px;
    bottom: 25%;
    right: -70px;
    animation-duration: 32s;
    animation-delay: 10s;
}

.dresscode .floating-circle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 60%;
    right: 10%;
    animation-duration: 30s;
    animation-delay: 5s;
}

/* Figuras geométricas decorativas */
.dresscode .geometric-shape {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.05;
    animation: rotateShape 45s linear infinite;
}

.dresscode .geometric-shape:nth-child(4) {
    width: 90px;
    height: 90px;
    top: 25%;
    left: 12%;
    background: linear-gradient(135deg, 
        rgba(115, 191, 184, 0.15), 
        transparent);
    transform: rotate(45deg);
}

.dresscode .geometric-shape:nth-child(5) {
    width: 110px;
    height: 110px;
    bottom: 30%;
    left: 8%;
    background: linear-gradient(135deg, 
        rgba(168, 218, 220, 0.12), 
        transparent);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation-duration: 50s;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -50px) scale(0.95);
        opacity: 0.4;
    }
    75% {
        transform: translate(40px, -20px) scale(1.05);
        opacity: 0.45;
    }
}

@keyframes rotateShape {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.05;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.08;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.05;
    }
}

.dresscode-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Header */
.dresscode-header {
    text-align: center;
    margin-bottom: 4rem;
}

.dresscode-header .section-title {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--accent-teal);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Línea decorativa */
.dresscode-header .decorative-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-teal) 20%, 
        var(--accent-aqua) 50%, 
        var(--accent-teal) 80%, 
        transparent 100%);
    margin: 24px auto;
    display: block;
    box-shadow: 0 0 15px rgba(115, 191, 184, 0.3);
}

.dresscode-header .decorative-line::before,
.dresscode-header .decorative-line::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-teal);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(115, 191, 184, 0.5);
}

.dresscode-header .decorative-line::before {
    left: -12px;
}

.dresscode-header .decorative-line::after {
    right: -12px;
}

.dresscode-header .section-subtitle {
    font-family: var(--font-elegant);
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 300;
    font-style: italic;
}

/* Descripción */
.dresscode-description {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.dresscode-description .dresscode-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

/* Grid de ejemplos */
.dresscode-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.dresscode-examples:has(.dresscode-card:only-child) {
    grid-template-columns: 1fr;
    max-width: 600px;
}

/* Cards con estilo marino */
.dresscode-card {
    background: linear-gradient(135deg, 
        rgba(27, 38, 59, 0.4) 0%, 
        rgba(37, 54, 73, 0.3) 100%);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.dresscode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--accent-teal), 
        var(--accent-aqua), 
        var(--accent-sand));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: left;
}

.dresscode-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, 
        rgba(115, 191, 184, 0.08) 0%, 
        transparent 60%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.dresscode-card:hover {
    transform: translateY(-8px);
    border-color: rgba(115, 191, 184, 0.3);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(115, 191, 184, 0.2);
}

.dresscode-card:hover::before {
    transform: scaleX(1);
}

.dresscode-card:hover::after {
    opacity: 1;
}

/* Contenedor de imagen */
.dresscode-image-container {
    position: relative;
    margin-bottom: 2rem;
}

.dresscode-card:not(:has(.dresscode-image)) .dresscode-image-container {
    display: none;
}

.dresscode-card:not(:has(.dresscode-image)) .dresscode-info {
    text-align: center;
    padding: 1rem 0;
}

.dresscode-image {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(115, 191, 184, 0.1);
}

.dresscode-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.85) contrast(1.05);
}

.dresscode-card:hover .dresscode-image img {
    transform: scale(1.08);
    filter: brightness(1) contrast(1.05);
}

/* Overlay de imagen */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(13, 27, 42, 0.3) 40%,
        rgba(13, 27, 42, 0.7) 100%
    );
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dresscode-card:hover .image-overlay {
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(13, 27, 42, 0.2) 40%,
        rgba(13, 27, 42, 0.6) 100%
    );
}

/* Icono decorativo */
.dresscode-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, 
        rgba(27, 38, 59, 0.9) 0%, 
        rgba(37, 54, 73, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.dresscode-card:hover .dresscode-icon {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--accent-aqua);
    box-shadow: 0 6px 20px rgba(115, 191, 184, 0.3);
}

.icon-symbol {
    font-size: 1.5rem;
    color: var(--accent-aqua);
}

/* Info del dresscode */
.dresscode-info {
    text-align: center;
    position: relative;
    z-index: 1;
}

.dresscode-title {
    font-family: var(--font-elegant);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--accent-aqua);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.dresscode-card:hover .dresscode-title {
    color: var(--accent-sand);
}

.dresscode-text-content {
    margin-bottom: 2rem;
}

.dresscode-description-text {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

/* Paleta de colores */
.color-palette {
    border-top: 1px solid rgba(115, 191, 184, 0.2);
    padding-top: 1.5rem;
    position: relative;
}

.palette-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.color-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--accent-teal);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.color-dot::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, 
        rgba(27, 38, 59, 0.95) 0%, 
        rgba(37, 54, 73, 0.9) 100%);
    color: var(--accent-aqua);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid var(--accent-teal);
}

.color-dot:hover {
    transform: scale(1.3);
    border-color: var(--accent-aqua);
    box-shadow: 
        0 6px 20px rgba(115, 191, 184, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.color-dot:hover::after {
    opacity: 1;
}

/* Footer del dresscode */
.dresscode-footer {
    text-align: center;
    border-top: 1px solid rgba(115, 191, 184, 0.2);
    padding-top: 3rem;
    max-width: 700px;
    margin: 0 auto;
}

.dresscode-note {
    max-width: 600px;
    margin: 0 auto;
}

.note-text {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--accent-teal);
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Estados especiales */
.dresscode:not(:has(.dresscode-examples .dresscode-card)) .dresscode-examples {
    display: none;
}

.dresscode:not(:has(.dresscode-examples .dresscode-card)) .dresscode-description {
    margin-bottom: 2rem;
}

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

@media (max-width: 1024px) {
    .dresscode {
        padding: 100px 0;
    }
    
    .dresscode-examples {
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .dresscode {
        min-height: auto;
        padding: 80px 0;
    }
    
    .dresscode-examples {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dresscode-card {
        padding: 1.5rem;
    }
    
    .dresscode-image {
        height: 240px;
    }
    
    .dresscode-header .section-title {
        font-size: 2.5rem;
    }
    
    .color-dots {
        gap: 0.8rem;
    }
    
    .color-dot {
        width: 25px;
        height: 25px;
    }
    
    .dresscode-card:not(:has(.dresscode-image)) {
        padding: 2rem 1.5rem;
    }
    
    /* Ocultar elementos decorativos en tablet */
    .dresscode .floating-circle:nth-child(3),
    .dresscode .geometric-shape:nth-child(5) {
        display: none;
    }
}

@media (max-width: 480px) {
    .dresscode {
        padding: 60px 0;
    }
    
    .dresscode-examples {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .dresscode-card {
        padding: 1.2rem;
    }
    
    .dresscode-image {
        height: 200px;
    }
    
    .note-text {
        font-size: 1.2rem;
    }
    
    .dresscode-title {
        font-size: 1.6rem;
    }
    
    .dresscode-description-text {
        font-size: 0.95rem;
    }
    
    .dresscode-card:not(:has(.dresscode-image)) {
        margin: 0;
    }
    
    .dresscode-header .decorative-line {
        width: 100px;
    }
    
    .color-dot {
        width: 22px;
        height: 22px;
    }
    
    /* Ocultar todos los elementos decorativos en móvil */
    .dresscode .floating-circle,
    .dresscode .geometric-shape {
        display: none;
    }
}

/* ================================================
   ANIMACIONES Y ESTADOS
   ================================================ */

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

.dresscode-card {
    animation: fadeInUp 0.8s ease-out forwards;
}

.dresscode-card:nth-child(1) { animation-delay: 0.1s; }
.dresscode-card:nth-child(2) { animation-delay: 0.2s; }
.dresscode-card:nth-child(3) { animation-delay: 0.3s; }

/* Estados de carga */
.dresscode.loading .dresscode-card,
.dresscode.loading .dresscode-footer {
    opacity: 0;
    transform: translateY(30px);
}

.dresscode.loaded .dresscode-card,
.dresscode.loaded .dresscode-footer {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ================================================
   ACCESIBILIDAD
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .dresscode::before,
    .dresscode .floating-circle,
    .dresscode .geometric-shape,
    .dresscode-card,
    .dresscode-card:hover,
    .dresscode-image img,
    .color-dot {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Focus states */
.dresscode-card:focus,
.color-dot:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 3px;
}
