/* 
 * Estilos CSS - Área Pública
 * Sistema de Administración de Quinta para Eventos
 */

/* Variables CSS */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Reset y Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

html {
    scroll-behavior: smooth;
}

/* Navegación */
.navbar {
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('/assets/img/hero-bg.jpg') center/cover no-repeat;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/img/hero_overlay.jpg');
    opacity: 0.8;
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .lead {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.hero-stats .stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    color: white;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stats .stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

/* Secciones */
section {
    padding: 80px 0;
}

.display-5 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Tarjetas de Servicios */
.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    transition: var(--transition);
}

.service-card:hover::before {
    left: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
}

.service-card h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Tarjetas de Paquetes */
.package-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid #e9ecef;
    position: relative;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.package-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.package-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid var(--secondary-color);
}

.package-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.package-price .price {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.package-price .period {
    font-size: 1.2rem;
    opacity: 0.8;
}

.package-body {
    padding: 2rem;
}

.package-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.package-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.package-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
}

.package-features li:last-child {
    border-bottom: none;
}

.package-features li i {
    margin-right: 0.75rem;
    width: 20px;
}

.package-footer {
    padding: 0 2rem 2rem;
}

/* Galería Moderna */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: #f8f9fa;
    box-shadow: var(--box-shadow);
    aspect-ratio: 1;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    text-align: center;
}

.gallery-view-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    margin-bottom: 1rem;
    cursor: pointer;
}

.gallery-view-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.gallery-counter {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.lightbox-close {
    top: -60px;
    right: 0;
}

.lightbox-prev {
    left: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* Animaciones de filtrado */
.gallery-item.filter-hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

.gallery-item.filter-visible {
    opacity: 1;
    transform: scale(1);
    transition: var(--transition);
}

/* Formulario de contacto */
.contact-form {
    box-shadow: var(--box-shadow);
}

.contact-info .contact-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.contact-info .contact-item i {
    color: var(--warning-color);
    margin-right: 1rem;
}

/* Botones */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 12px 30px;
    transition: var(--transition);
    border-width: 2px;
}

.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.4);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 193, 7, 0.4);
}

.btn-outline-light {
    border-color: white;
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    border-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
    z-index: 1000;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #1ebe5a;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Formularios */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Gallery */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-stats {
        margin-top: 3rem;
    }
    
    .service-card,
    .package-card {
        margin-bottom: 2rem;
    }
    
    .package-price .price {
        font-size: 2.5rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .gallery-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-view-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: -60px;
    }
    
    .lightbox-next {
        right: -60px;
    }
    
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .package-header {
        padding: 1.5rem;
    }
    
    .package-body {
        padding: 1.5rem;
    }
    
    .package-footer {
        padding: 0 1.5rem 1.5rem;
    }
    
    .contact-form {
        margin-top: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-info {
        bottom: 10px;
        font-size: 0.9rem;
    }
}

/* Efectos especiales */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Lazy loading placeholder */
.gallery-image[data-src] {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    background-size: 400% 400%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Botón ver más */
#loadMoreBtn {
    transition: var(--transition);
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
}

/* Estados de carga */
.gallery-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.gallery-loading .loading {
    margin-right: 0.5rem;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .service-card,
    .package-card,
    .contact-form {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .package-features li {
        border-color: #4a5568;
    }
    
    .form-control {
        background-color: #4a5568;
        border-color: #718096;
        color: #e9ecef;
    }
    
    .form-control:focus {
        background-color: #4a5568;
        color: #e9ecef;
    }
}

/* Print styles */
@media print {
    .navbar,
    .whatsapp-float,
    .hero-section,
    footer {
        display: none !important;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .service-card,
    .package-card {
        border: 1px solid #000;
        box-shadow: none;
        margin-bottom: 20px;
    }
}