/* MEDIDAS DE SEGURIDAD */
/* Deshabilitar selección de texto */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Estilos para cuando las protecciones están desactivadas - Esta clase se agregará al body mediante JS */
.protections-disabled * {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
    -webkit-touch-callout: auto !important;
    pointer-events: auto !important;
}

.protections-disabled img {
    -webkit-user-drag: auto !important;
    -khtml-user-drag: auto !important;
    -moz-user-drag: auto !important;
    -o-user-drag: auto !important;
    user-drag: auto !important;
    pointer-events: auto !important;
}

.protections-disabled .img-protection,
.protections-disabled .watermark-overlay,
.protections-disabled .watermark-overlay-mobile,
.protections-disabled .anti-screenshot,
.protections-disabled .popup-watermark,
.protections-disabled .popup-watermark-small,
.protections-disabled .watermark-overlay-element {
    display: none !important;
}

/* Estilos para el logo y contenedor del logo */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-link {
    display: block;
    text-decoration: none;
    pointer-events: auto;
}

.logo {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
    pointer-events: auto;
    /* Quitar sombra y borde para un efecto de fondo transparente */
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 5px 0;
}

.logo:hover {
    transform: scale(1.05);
}

/* Protección específica para imágenes */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Protección contra clic derecho */
body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Overlay invisible para proteger imágenes */
.img-protection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    cursor: pointer;
}

/* Marca de agua CSS */
.watermark-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
    z-index: 5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Arial Black', Arial, sans-serif;
}

/* Marca de agua más ligera para dispositivos móviles */
.watermark-overlay-mobile {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-transform: uppercase;
    font-family: 'Arial', sans-serif;
}

/* Anti-screenshot overlay */
.anti-screenshot {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.01) 50%, transparent 51%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

/* Forzar visibilidad y tamaño de controles Lightbox */
.lb-close, .lb-prev, .lb-next {
    display: block !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}
.lb-close {
    top: 20px !important;
    right: 30px !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(0,0,0,0.7) !important;
    color: #fff !important;
    border-radius: 50%;
    font-size: 2rem !important;
    text-align: center;
    line-height: 40px !important;
    transition: background 0.2s;
}
.lb-close:hover {
    background: #e74c3c !important;
}
.lb-prev, .lb-next {
    width: 60px !important;
    height: 60px !important;
    background: rgba(0,0,0,0.5) !important;
    color: #fff !important;
    border-radius: 50%;
    font-size: 2.5rem !important;
    top: 50% !important;
    margin-top: -30px !important;
    transition: background 0.2s;
}
.lb-prev:hover, .lb-next:hover {
    background: #3498db !important;
}
.lb-prev {
    left: 20px !important;
}
.lb-next {
    right: 20px !important;
}
/* Variables globales */
:root {
    --primary-color: #f4f4f4;
    --secondary-color: #333;
    --accent-color: #7eb8e2;
    --text-color: #333;
    --light-text: #fff;
    --transition-speed: 0.3s;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
}

/* Header y Navegación */
header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px; /* Margen vertical reducido */
  background-color: white;
  height: 100px; /* altura total opcional y compacta */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: bottom;
    margin-right: auto;
}

.logo-link {
    display: block;
    text-decoration: none;
    pointer-events: auto;
}

.logo {
  max-height: 200px;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  pointer-events: auto;
  align-items: bottom;
  margin-bottom: -70px;

  /* Recorte personalizado */
  clip-path: inset(20px 30px 60px 30px); /* top right bottom left */
}

.logo:hover {
    transform: scale(1.05);
}

/* Eliminamos el estilo de h1 ya que no lo usamos más */

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../images/PHOTO-2025-06-27-10-19-47.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
}

.hero-content {
    padding: 2rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Galería */
.galeria {
    padding: 5rem 2rem;
    background-color: #fff;
}

.galeria h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.galeria-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 48%, rgba(255,255,255,0.01) 49%, rgba(255,255,255,0.01) 51%, transparent 52%);
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: difference;
}

.img-container {
    position: relative !important;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed);
}

.img-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.02) 50%, transparent 70%);
    pointer-events: none;
    z-index: 8;
}

.img-container:hover {
    transform: scale(1.03);
}

.img-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.img-container:hover img {
    transform: scale(1.1);
}

/* Sobre Mí */
.sobre-mi {
    padding: 5rem 2rem;
    background-color: var(--primary-color);
}

.sobre-mi-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.sobre-mi h2 {
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 2rem;
    text-align: center;
}

/* Estilos para mensaje de carga */
.loading-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 18px;
    color: var(--text-color);
    grid-column: 1 / -1;
}

.loading-message p {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Protección contra impresión */
@media print {
    .galeria, .galeria-grid, .img-container, img {
        display: none !important;
        visibility: hidden !important;
    }
    
    body::after {
        content: "Este contenido está protegido contra impresión";
        display: block;
        text-align: center;
        font-size: 24px;
        padding: 50px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem;
    }
    
    .logo-container {
        margin-right: 0;
    }
    
    .nav-links {
        gap: 0.8rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .img-container {
        height: 300px;
    }
}

/* Animaciones de Lightbox */
.lb-outerContainer {
    border-radius: 10px !important;
}

.lb-dataContainer {
    border-radius: 0 0 10px 10px !important;
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.galeria-grid a {
    animation: fadeIn 1s ease-in;
}

*::selection {
    background: transparent;
}

*::-moz-selection {
    background: transparent;
}

/* Deshabilitar guardar imagen */
img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 10;
}

/* Protección adicional contra capturas en popup */
.baguetteBox-overlay {
    position: relative !important;
}

.baguetteBox-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.02) 50%, transparent 51%);
    pointer-events: none;
    z-index: 99997;
}

/* Overlay anti-screenshot mejorado */
.anti-screenshot {
    background: linear-gradient(45deg, 
        transparent 48%, 
        rgba(255,255,255,0.02) 49%, 
        rgba(255,255,255,0.02) 51%, 
        transparent 52%),
    linear-gradient(-45deg, 
        transparent 48%, 
        rgba(0,0,0,0.01) 49%, 
        rgba(0,0,0,0.01) 51%, 
        transparent 52%);
    animation: interference 0.1s infinite;
}

@keyframes interference {
    0% { opacity: 0.98; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}

/* Protección contra herramientas de captura */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.001) 2px,
        rgba(255,255,255,0.001) 4px
    );
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: difference;
}

/* Mejorar marcas de agua existentes */
.watermark-overlay {
    animation: watermarkPulse 3s infinite ease-in-out;
}

.watermark-overlay-mobile {
    animation: watermarkPulseMobile 5s infinite ease-in-out;
}

@keyframes watermarkPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

@keyframes watermarkPulseMobile {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

/* Estilos para las marcas de agua del popup */
.watermark-overlay-element {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo específico para popup-watermark cuando está dentro del overlay */
.watermark-overlay-element .popup-watermark {
    mix-blend-mode: difference;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.6);
    -webkit-text-stroke: 1px rgba(0,0,0,0.6);
    letter-spacing: 10px;
}

/* Estilo para marcas de agua pequeñas dentro del overlay */
.watermark-overlay-element .popup-watermark-small {
    mix-blend-mode: difference;
    opacity: 0.8;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

/* Asegurar que las imágenes en baguetteBox tengan pointer-events deshabilitados */
.baguetteBox-figure img {
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
}
