/* ==========================================================================
   Salento Rénovations Sicuro SA - Styles custom
   ========================================================================== */

:root {
    --primary: #C9A96E;
    --primary-dark: #B08C4A;
    --secondary: #2C3E50;
    --secondary-dark: #1A252F;
    --accent: #FFFFFF;
    --gold: #C9A96E;
    --gold-light: #D4BA88;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #F8F9FA;
}

/* Typography */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Navbar */
#mainNav {
    transition: background-color 0.3s ease;
}

#mainNav.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar-brand {
    font-size: 1.3rem;
}

/* Override Bootstrap primary */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary-dark);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(44,62,80,0.92) 0%, rgba(44,62,80,0.75) 50%, rgba(201,169,110,0.3) 100%),
                url('/assets/img/hero-bg.jpg') center/cover no-repeat;
    color: #fff;
    padding-top: 80px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,169,110,0.15), transparent 70%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,169,110,0.1), transparent 70%);
    pointer-events: none;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-section::before,
    .hero-section::after {
        display: none;
    }
}

/* Section headings */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin-top: 0.5rem;
}

.section-title.text-center::after {
    margin-left: auto;
    margin-right: auto;
}

/* Service Cards */
.service-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

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

.service-card .card-body {
    padding: 1.5rem;
}

.service-card .service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: rgba(201, 169, 110, 0.15);
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card .card-title a {
    color: var(--secondary);
    text-decoration: none;
}

.service-card .card-title a:hover {
    color: var(--primary);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-overlay span {
    color: #fff;
    font-size: 0.9rem;
}

/* Lightbox */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-backdrop img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    background: none;
    border: none;
    line-height: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 1rem;
    z-index: 10000;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* Testimonials */
.testimonial-card {
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    padding: 2rem;
}

.testimonial-card .stars {
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.testimonial-card blockquote {
    font-style: italic;
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

/* Contact section */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.contact-info-item .icon-box {
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: rgba(201, 169, 110, 0.15);
    color: var(--primary);
    font-size: 1.2rem;
}

/* About section */
.about-section {
    background-color: var(--bg-light);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
}

/* Breadcrumb */
.breadcrumb-section {
    background-color: var(--bg-light);
    padding: 1rem 0;
    margin-top: 72px;
}

.breadcrumb-section .breadcrumb {
    margin-bottom: 0;
}

/* Page header */
.page-header {
    padding-top: 100px;
    padding-bottom: 2rem;
    background-color: var(--secondary);
    color: #fff;
}

/* Service detail page */
.service-detail-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background-color: rgba(230, 126, 34, 0.15);
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    cursor: pointer;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Admin panel */
.admin-sidebar {
    min-height: 100vh;
    background-color: var(--secondary);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
}

/* Drag & drop upload zone */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background-color: rgba(230, 126, 34, 0.05);
}

/* Photo grid admin */
.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: grab;
}

.admin-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-photo-item .photo-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.admin-photo-item .photo-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background-color: #f0f0f0;
}

/* Fix for fixed navbar spacing */
main {
    min-height: calc(100vh - 200px);
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* Counter section */
.counter-section {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
}

.counter-label {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.counter-icon {
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

/* Print */
@media print {
    .navbar, footer, .scroll-top, .btn, .whatsapp-float {
        display: none !important;
    }
}
