/* Elena Ciobanu Photography - Main CSS */

/* CSS Variables */
:root {
    --primary-font: 'Playfair Display', serif;
    --secondary-font: 'Source Sans Pro', sans-serif;
    --primary-color: #57534e;
    --secondary-color: #d4b5a0;
    --accent-color: #c49b80;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
}

/* Base Styles */
body {
    font-family: var(--secondary-font);
    scroll-behavior: smooth;
}

.font-primary {
    font-family: var(--primary-font);
}

/* Hero Section Styles */
.hero-gradient {
    background: linear-gradient(135deg, rgba(250, 248, 246, 0.9) 0%, rgba(245, 240, 235, 0.8) 100%);
}

.service-hero {
    min-height: 70vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Image Overlay Effects */
.image-overlay {
    background: linear-gradient(45deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

.image-overlay-dark {
    background: linear-gradient(45deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Reveal Animation Class - Ottimizzata */
.reveal {
    opacity: 0;
    transform: translateY(20px);  /* Ridotto da 30px a 20px */
    transition: opacity 0.6s ease, transform 0.6s ease;  /* Fallback CSS */
}

/* Stato animato per GSAP */
.reveal.gsap-animated {
    transition: none;  /* Disabilita CSS transition quando GSAP prende il controllo */
}

/* Animazione CSS pura come backup */
.reveal.backup-animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Animazione immediata per elementi già visibili */
.reveal.immediate {
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

/* Preload animation per hero elements */
.hero-section .reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Performance: GPU acceleration per animazioni smooth */
.reveal,
.card-hover {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

.gallery-item {
    will-change: transform, opacity;
}

/* Riduzione motion per utenti che preferiscono meno animazioni */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    
    .gallery-item,
    .card-hover {
        transition: none;
    }
    
    * {
        animation-duration: 0.01s !important;
        transition-duration: 0.01s !important;
    }
}
/* Navigation Styles */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

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

/* Scroll Progress Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--stone-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

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

/* Form Styles */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid var(--stone-300);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 181, 160, 0.1);
}

/* Select custom arrow */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Submit button */
.btn-submit {
    padding: 0.875rem 3rem;
    font-size: 1rem;
    letter-spacing: 0.025em;
    min-width: 220px;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Custom checkbox */
.privacy-checkbox:checked ~ .privacy-box,
.privacy-checkbox:checked + .privacy-box {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.privacy-checkbox:checked ~ .privacy-box .check-icon,
.privacy-checkbox:checked + .privacy-box .check-icon {
    display: block;
}

.privacy-checkbox:focus ~ .privacy-box,
.privacy-checkbox:focus + .privacy-box {
    box-shadow: 0 0 0 3px rgba(87, 74, 64, 0.15);
}

/* Spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 0.8s linear infinite;
}

/* Testimonial Styles */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -10px;
    left: 2rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--secondary-color);
}

/* Masonry Gallery - solo grid-auto-rows, layout gestito da Tailwind */
.masonry-gallery {
    grid-auto-rows: 4px;
}

/* Portfolio & Masonry Styles */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 1.5rem;
    grid-auto-rows: 10px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.masonry-item img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Filter Buttons */
.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--stone-300);
    background: white;
    color: var(--stone-600);
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Gallery Item */
.gallery-item {
    cursor: pointer;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

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

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--stone-800);
}

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

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

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

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

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
}

.lightbox-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    opacity: 0.8;
}

/* FAQ Styles */
.faq-item {
    border-bottom: 1px solid var(--stone-200);
}

.faq-question {
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--secondary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.active {
    transform: rotate(180deg);
}

/* Service Page Specific */
.service-info-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary-color);
}

/* Animation States */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-gap: 1rem;
    }
    
    .service-hero {
        min-height: 60vh;
    }
    
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-info {
        position: relative;
        bottom: auto;
        margin-top: 1rem;
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--stone-100);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Print Styles */
@media print {
    .scroll-indicator,
    nav,
    footer,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
}