/* Areas Page Specific Styles */

/* Area cards */
.area-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.area-header {
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.area-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.area-header.embalagem::before {
    background: url('/static/images/embalagem-bg.jpg') center/cover;
}

.area-header.editorial::before {
    background: url('/static/images/editorial-bg.jpg') center/cover;
}

.area-header.comercial::before {
    background: url('/static/images/comercial-bg.png') center/cover;
}

.area-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #201a31; /* Dark blue-black color */
    opacity: 0.75;
    z-index: 2;
}

.area-header h3,
.area-header .service-icon {
    position: relative;
    z-index: 3;
}

.area-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.area-header .service-icon {
    background: rgb(195 123 10);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.area-image-wrapper {
    width: 225px;
    height: 225px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.area-image {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.3s ease;
}

/* Gallery Carousel Styles */
.gallery-carousel-container {
    position: relative;
    margin-bottom: 2rem;
}

.gallery-carousel-wrapper {
    overflow: hidden;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gallery-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-card {
    flex: 0 0 calc(100% / 3);
    box-sizing: border-box;
    padding: 0 10px;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(184, 113, 50, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: white;
}

.gallery-image-wrapper:hover .gallery-image {
    transform: scale(1.1);
}

/* Image Modal/Lightbox Styles - FIXED */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    z-index: 1;
}

.modal-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--primary-brown);
    border: 2px solid white;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
    background: var(--light-brown);
    transform: scale(1.1);
}

.modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: white;
    z-index: 13;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% + 120px);
    left: -60px;
    display: flex;
    justify-content: space-between;
    z-index: 14;
}

.modal-nav-btn {
    background: var(--primary-brown);
    border: 2px solid white;
    color: white;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-nav-btn:hover {
    background: var(--light-brown);
    transform: scale(1.1);
}

.modal-counter {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-brown);
    padding: 8px 20px;
    border-radius: 25px;
    border: 2px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 14;
}

/* Gallery dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.gallery-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot:hover {
    background-color: var(--light-brown);
    transform: scale(1.2);
}

.gallery-dot.active {
    background-color: var(--primary-brown);
    transform: scale(1.3);
}

/* Carousel Controls for Gallery */
.gallery-carousel-container .carousel-control-prev,
.gallery-carousel-container .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-carousel-container .carousel-control-prev:hover,
.gallery-carousel-container .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.gallery-carousel-container .carousel-control-prev {
    left: -25px;
}

.gallery-carousel-container .carousel-control-next {
    right: -25px;
}

/* Process Section Feature Icons */
.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}


/* Areas Page Responsive Design */
@media (max-width: 768px) {
    .gallery-card {
        flex: 0 0 100%;
    }
    
    .gallery-image-wrapper {
        height: 200px;
    }
    
    .area-header {
        padding: 1.5rem 1rem;
    }
    
    .area-header h3 {
        font-size: 1.25rem;
    }
    
    .area-image-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .gallery-carousel-container .carousel-control-prev {
        left: -15px;
    }
    
    .gallery-carousel-container .carousel-control-next {
        right: -15px;
    }
    
    .gallery-carousel-container .carousel-control-prev,
    .gallery-carousel-container .carousel-control-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Modal responsive */
    .modal-content {
        max-width: 95vw;
        max-height: 90vh;
        padding: 15px;
    }
    
    .modal-close {
        top: -10px;
        right: -10px;
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
    }
    
    .modal-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .modal-navigation {
        width: calc(100% + 100px);
        left: -50px;
    }
    
    .modal-counter {
        bottom: -50px;
        font-size: 0.9rem;
        padding: 6px 15px;
    }
    
    .modal-image {
        max-height: 60vh;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .gallery-card {
        flex: 0 0 50%;
    }
    
    .area-image-wrapper {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 576px) {
    .area-header {
        padding: 1rem;
    }
    
    .area-header h3 {
        font-size: 1.1rem;
    }
    
    .area-image-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Very small screens modal adjustments */
    .modal-content {
        max-width: 98vw;
        max-height: 95vh;
        padding: 10px;
    }
    
    .modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .modal-navigation {
        width: calc(100% + 80px);
        left: -40px;
    }
    
    .modal-image {
        max-height: 55vh;
    }
}