﻿/* Estilos generales */
body {
    margin: 0;
    height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: auto;
    font-family: 'SF Pro Text', -apple-system, sans-serif;
}

/* === Estilos para iPhone === */
.iphone-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
    z-index: 1;
}

/* Posición inicial en cascada */
#iphone-1 {
    top: 160px;
    left: 40px;
    transform: rotate(-5deg);
}

#iphone-2 {
    top: 170px;
    left: 250px;
    transform: rotate(0deg);
}

#iphone-3 {
    top: 170px;
    left: 450px;
    transform: rotate(5deg);
}

.iphone-container:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.iphone-title {
    margin: 0;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.iphone-frame {
    width: 205px;
    height: 466px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 0 0 3px #333, 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: grab;
    user-select: none;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.iphone-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iphone-screen::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 25px;
    background: #1a1a1a;
    border-radius: 10px;
    z-index: 10;
}

.resize-handle {
    width: 14px;
    height: 14px;
    background: #555;
    position: absolute;
    right: 6px;
    bottom: 6px;
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 20;
}

/* === Estilos para iMac === */
.imac-container {
    position: absolute;
    top: 170px;
    left: 700px;
    z-index: auto;
}

.imac-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.imac-frame {
    width: 600px;
    height: 400px;
    position: relative;
}

.imac-screen {
    width: 100%;
    height: 85%;
    background: #000;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    position: relative;
    border: 8px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.imac-stand {
    width: 100px;
    height: 80px;
    background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
    margin: 0 auto;
    position: relative;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}

.imac-base {
    width: 180px;
    height: 20px;
    background: #c0c0c0;
    margin: 0 auto;
    border-radius: 10px;
    position: relative;
    top: -10px;
}
/* === Estilos Mejorados para Galería === */
.gallery {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden; /* Asegura que nada se salga del contenedor */
}

.gallery img, 
.gallery video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mantiene relación de aspecto */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden; /* Mejor que display:none para transiciones */
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.gallery img.active, 
.gallery video.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Controles de navegación */
.gallery-prev, 
.gallery-next {
    position: absolute;
    bottom: 15px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 1000; /* Mayor z-index que las imágenes */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0; /* Elimina padding por defecto en algunos navegadores */
    outline: none; /* Quita el outline al enfocar */
}

.gallery-prev:hover, 
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev { 
    left: 3px;
}

.gallery-next { 
    right: 3px;
}

/* Indicadores de posición */
.gallery-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.gallery-indicator.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Estilos específicos para video */
.gallery video {
    background: #000; /* Fondo negro para áreas no cubiertas por el video */
}

/* Mejoras de accesibilidad */
.gallery-prev:focus,
.gallery-next:focus,
.gallery-indicator:focus {
    box-shadow: 0 0 0 2px #4a90e2;
}
