/* Cosmatel Main Website Styles */

:root {
    /* Brand Colors */
    --cosmatel-primary: #1d469b;
    --cosmatel-primary-dark: #153570;
    --cosmatel-primary-light: #2d5bb8;
    --cosmatel-white: #ffffff;
    --cosmatel-light: #f5f5f5;
    --cosmatel-dark: #3C3744;
    
    /* Text Colors */
    --text-primary: #363636;
    --text-secondary: #7a7a7a;
    --text-light: #b5b5b5;
    --text-white: #E9E9E9;
    
    /* Typography */
    --font-primary: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* Typography */
body {
    font-family: var(--font-primary);
    color: var(--text-primary);
}

/* Hero Section */
.hero-intro {
    margin-bottom: 1.25rem;
}

.hero-title {
    color: var(--text-primary);
}

.hero-slogan {
    font-family: "Caveat", "Brush Script MT", "Lucida Handwriting", cursive !important;
    font-weight: 600 !important;
    font-size: 5.5rem !important;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 2rem !important;
    background: linear-gradient(to right, var(--cosmatel-primary), #000000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .hero-slogan {
        font-size: 3.5rem !important;
    }
}

.hero-subtitle-primary {
    color: var(--cosmatel-primary);
    font-weight: var(--font-weight-semibold);
}

.hero-subtitle-text {
    color: var(--text-primary);
}

/* Hero Image */
.hero-image-column {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.hero-image-wrapper {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .hero-image-column {
        display: none;
    }
}

/* Section Headers */
.section-header .title {
    color: var(--text-primary);
}

.section-header .subtitle {
    color: var(--cosmatel-primary);
}

/* Partners Carousel */
.partners-carousel-wrapper {
    position: relative;
    overflow: visible;
    padding: 0;
    width: 100%;
}

.partners-carousel-container {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: var(--cosmatel-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.carousel-nav:hover {
    background-color: var(--cosmatel-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.partners-carousel {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.partners-slide {
    min-width: 70%;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: slideInFade 0.6s ease-out forwards;
}

.partners-slide:nth-child(1) {
    animation-delay: 0.1s;
}

.partners-slide:nth-child(2) {
    animation-delay: 0.2s;
}

.partners-slide:nth-child(3) {
    animation-delay: 0.3s;
}

.partners-slide:nth-child(4) {
    animation-delay: 0.4s;
}

.partners-slide:nth-child(5) {
    animation-delay: 0.5s;
}

.partners-slide:nth-child(n+6) {
    animation-delay: 0.6s;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.partners-slide .box {
    border: 2px solid var(--cosmatel-primary);
    background-color: var(--cosmatel-white);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
}

.partners-slide .box.alt-bg {
    background-color: var(--cosmatel-white);
}

.partners-slide-title {
    color: var(--cosmatel-primary);
    margin-bottom: 1rem;
}

.partners-slide-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.partners-slide-title a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.partners-slide-content {
    width: 100%;
    margin: 0;
}

.partners-slide-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.partners-slide .columns {
    width: 100%;
    margin: 0;
    align-items: center;
}

.partners-slide .columns .column {
    display: flex;
    align-items: center;
    justify-content: center;
}

.partners-slide .image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    max-height: 320px;
    width: 100%;
}

.partners-slide-image {
    object-fit: contain;
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
}

.partners-slide-product {
    object-fit: contain;
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.partners-slide-description {
    max-width: 500px;
    margin-top: 1rem;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.05em;
    color: #4a5568;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
}

/* Footer */
footer.footer,
.footer {
    background: linear-gradient(135deg, var(--cosmatel-dark) 0%, #2a2f3a 100%);
    color: var(--text-white);
    font-size: 16px;
    line-height: 1.6;
    padding: 3rem 0 0 0;
    margin-top: 4rem;
    border-top: 3px solid var(--cosmatel-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-company {
    max-width: 300px;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.footer-since {
    font-size: 0.9rem;
    color: var(--cosmatel-primary-light);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--cosmatel-primary-light);
    transform: translateX(3px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
}

.footer-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.footer-link:hover .footer-icon {
    opacity: 1;
}

.footer-social-links {
    display: flex;
    gap: 1rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.footer-social-link:hover {
    background: var(--cosmatel-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(29, 70, 155, 0.4);
    border-color: var(--cosmatel-primary-light);
}

.footer-social-link img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-social-link:hover img {
    opacity: 1;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-copyright p {
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-company {
        max-width: 100%;
        text-align: center;
    }
    
    .footer-logo {
        display: flex;
        justify-content: center;
    }
    
    .footer-social-links {
        justify-content: center;
    }
    
    footer.footer,
    .footer {
        padding: 2rem 0 0 0;
    }
    
    .footer-content {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-heading {
        font-size: 0.9rem;
    }
    
    .footer-link {
        font-size: 0.9rem;
    }
}

/* Navbar Typography (injected via JS, but defined here for reference) */
.navbar .navbar-item,
.navbar .navbar-link {
    font-family: var(--font-primary);
    letter-spacing: 0.03em;
    font-weight: var(--font-weight-medium);
}

.navbar .navbar-item:hover,
.navbar .navbar-link:hover {
    font-weight: var(--font-weight-semibold);
}

/* Location Links */
.location-title {
    color: var(--cosmatel-primary);
}

.location-title-alt {
    color: var(--cosmatel-primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .partners-carousel-container {
        padding: 0;
        mask-image: none;
        -webkit-mask-image: none;
    }
    
    .partners-slide {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .partners-slide .box {
        min-height: 400px;
        padding: 1.5rem;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Navbar Typography (injected via JS, but defined here for reference) */
.navbar .navbar-item,
.navbar .navbar-link {
    font-family: var(--font-primary);
    letter-spacing: 0.03em;
    font-weight: var(--font-weight-medium);
}

.navbar .navbar-item:hover,
.navbar .navbar-link:hover {
    font-weight: var(--font-weight-semibold);
}

/* Location Links */
.location-title {
    color: var(--cosmatel-primary);
}

.location-title-alt {
    color: var(--cosmatel-primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .partners-carousel-container {
        padding: 0;
        mask-image: none;
        -webkit-mask-image: none;
    }
    
    .partners-slide {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .partners-slide .box {
        min-height: 400px;
        padding: 1.5rem;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}


/* ========================================
   Portfolio/Trabalhos Page Styles
   Extracted from trabalhos.html
   ======================================== */
/* Card text hierarchy */
.job-title { 
    font-weight: 700; 
    font-size: 1.25rem; 
    color: #1f2937; 
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.job-description { 
    margin-top: .5rem; 
    color: #4b5563; 
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* line-clamp: 3; */ /* Not widely supported, using -webkit-line-clamp instead */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-meta { 
    display: flex; 
    gap: 1.25rem; 
    align-items: center; 
    margin-top: 1rem; 
    color: #6b7280; 
    font-size: .9rem; 
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
.job-meta span { 
    display: inline-flex; 
    align-items: center;
    gap: 0.35rem;
}
.job-meta img.icon { 
    width: 1em; 
    height: 1em; 
    opacity: 0.7;
}
.card .content { 
    line-height: 1.45; 
    padding: 1.5rem;
}

/* Enhanced card styling */
.card.is-shady { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card.is-shady:hover { 
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.12), 0 0 0 1px rgba(29, 70, 155, 0.1);
    border-color: rgba(29, 70, 155, 0.2);
}
.card.is-shady:active {
    transform: translateY(-2px);
    transition: transform .1s ease;
}

/* Card image enhancements */
.card.is-shady .card-image {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.card.is-shady .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card.is-shady:hover .card-image::after {
    opacity: 1;
}

.card.is-shady .card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.is-shady:hover .card-image img {
    transform: scale(1.05);
}

/* Button styling in cards */
.card.is-shady .button.is-link {
    margin-top: 1rem;
    background: #1d469b;
    border-color: #1d469b;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

.card.is-shady:hover .button.is-link {
    background: #153570;
    border-color: #153570;
    transform: translateX(4px);
}

/* Professional Large Overlay Design */
body.portfolio-overlay-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
    padding: 2rem;
    box-sizing: border-box;
    pointer-events: auto;
}

.portfolio-overlay.is-active {
    display: flex;
}

.portfolio-overlay:not(.is-active) {
    display: none;
}

.portfolio-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
    cursor: pointer;
    pointer-events: auto;
    /* Ensure backdrop is always clickable */
    touch-action: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes imageFadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.portfolio-modal-fullpage {
    position: relative;
    width: 95%;
    max-width: 1600px;
    height: 90%;
    max-height: 95vh;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 1;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-modal-header {
    padding: 2rem 2.5rem;
    background: #1d469b;
    color: #ffffff;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.portfolio-modal-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.portfolio-modal-title-section {
    flex: 1;
}

.portfolio-modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.portfolio-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 1rem;
    color: #ffffff;
}

.portfolio-modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
}

.portfolio-modal-meta-item span {
    color: #ffffff;
}

.portfolio-modal-meta-item img {
    width: 1.2em;
    height: 1.2em;
    filter: brightness(0) invert(1);
}

.portfolio-modal-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

.portfolio-modal-actions .button {
    transition: all 0.2s ease;
}

.portfolio-modal-actions .button:hover {
    transform: scale(1.05);
}

.portfolio-modal-actions .button:active {
    transform: scale(0.95);
}

.portfolio-modal-close-btn {
    transition: all 0.2s ease;
    z-index: 1000;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.portfolio-modal-close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    opacity: 0.8;
}

.portfolio-modal-close-btn:active {
    transform: rotate(90deg) scale(0.95);
    opacity: 0.9;
}

.portfolio-modal-body {
    display: flex;
    flex: 1 1 auto;
    overflow: hidden;
    min-height: 0;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

.portfolio-modal-gallery {
    flex: 1.857 1 auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 400px;
    min-height: 500px;
    width: auto;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.portfolio-modal-main-image,
#modal-main-image-container {
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    position: relative;
    overflow: auto;
    height: 100%;
    min-height: 400px;
    width: 100%;
    visibility: visible !important;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    padding: 1rem;
    box-sizing: border-box;
}

.portfolio-modal-main-image.zoomed,
#modal-main-image-container.zoomed {
    overflow: auto;
    cursor: grab;
}

.portfolio-modal-main-image.zoomed:active,
#modal-main-image-container.zoomed:active {
    cursor: grabbing;
}

/* Zoom reset button */
.portfolio-modal-zoom-reset {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.portfolio-modal-zoom-reset:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.portfolio-modal-zoom-reset.visible {
    display: flex;
}

.portfolio-modal-main-image img,
#modal-main-image-container img {
    max-width: 95% !important;
    max-height: 95% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: opacity 0.4s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: imageFadeIn 0.5s ease;
    cursor: zoom-in;
    touch-action: pan-x pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.portfolio-modal-main-image img.zoomed,
#modal-main-image-container img.zoomed {
    cursor: zoom-out;
    transform-origin: center center;
}

.portfolio-modal-main-image img.zooming,
#modal-main-image-container img.zooming {
    transition: none;
}

.portfolio-modal-main-image img.loading,
#modal-main-image-container img.loading {
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite;
}

.portfolio-modal-main-image img.image-changing,
#modal-main-image-container img.image-changing {
    opacity: 0;
    transform: scale(0.98);
}

/* Ensure images can be as large as possible on desktop */
@media (min-width: 1024px) {
    .portfolio-modal-main-image img,
    #modal-main-image-container img {
        max-width: 98%;
        max-height: 98%;
    }
}

@media (min-width: 1400px) {
    .portfolio-modal-main-image img,
    #modal-main-image-container img {
        max-width: 100%;
        max-height: 100%;
    }
}

.portfolio-modal-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    border: 2px solid rgba(0, 0, 0, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.portfolio-modal-gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.portfolio-modal-gallery-nav.prev {
    left: 20px;
}

.portfolio-modal-gallery-nav.next {
    right: 20px;
}

.portfolio-modal-gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.portfolio-modal-thumbnails {
    padding: 1rem;
    background: white;
    border-top: 2px solid #e8e8e8;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.portfolio-modal-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.portfolio-modal-thumbnails::-webkit-scrollbar-track {
    background: #f7fafc;
}

.portfolio-modal-thumbnails::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

/* Webkit scrollbar thumb hover - removed as some browsers don't support :hover on pseudo-elements */

.portfolio-modal-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f0f0f0;
    position: relative;
}

.portfolio-modal-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(29, 70, 155, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.portfolio-modal-thumbnail:hover {
    border-color: #1d469b;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 70, 155, 0.3);
}

.portfolio-modal-thumbnail:hover::before {
    background: rgba(29, 70, 155, 0.1);
}

.portfolio-modal-thumbnail.active {
    border-color: #1d469b;
    box-shadow: 0 0 0 2px rgba(29, 70, 155, 0.2), 0 4px 8px rgba(29, 70, 155, 0.15);
    transform: scale(1.05);
}

.portfolio-modal-thumbnail img {
    transition: transform 0.3s ease;
}

.portfolio-modal-thumbnail:hover img {
    transform: scale(1.1);
}

.portfolio-modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-modal-content {
    flex: 1 1 auto;
    padding: 2.5rem 3rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    min-width: 0;
    max-width: 35%;
    box-sizing: border-box;
    animation: slideInFromRight 0.5s ease 0.2s both;
}

.portfolio-modal-section {
    animation: slideInFromRight 0.5s ease both;
}

.portfolio-modal-section:nth-child(1) {
    animation-delay: 0.3s;
}

.portfolio-modal-section:nth-child(2) {
    animation-delay: 0.4s;
}

.portfolio-modal-section:nth-child(3) {
    animation-delay: 0.5s;
}

.portfolio-modal-content::-webkit-scrollbar {
    width: 8px;
}

.portfolio-modal-content::-webkit-scrollbar-track {
    background: #f7fafc;
}

.portfolio-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

/* Webkit scrollbar thumb hover - removed as some browsers don't support :hover on pseudo-elements */

.portfolio-modal-section {
    margin-bottom: 2.5rem;
}

.portfolio-modal-section-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1d469b;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #1d469b;
}

.portfolio-modal-description {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #1f2937;
    white-space: pre-wrap;
}

.portfolio-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.portfolio-modal-info-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1d469b;
    transition: background-color 0.2s;
}

.portfolio-modal-info-item:hover {
    background: #f0f0f0;
}

.portfolio-modal-info-label {
    font-size: 0.85rem;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-modal-info-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
}

.portfolio-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-modal-tag {
    padding: 0.5rem 1rem;
    background: #1d469b;
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.portfolio-modal-image-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {
    .portfolio-overlay {
        padding: 1rem;
    }
    
    .portfolio-modal-fullpage {
        width: 98%;
        height: 95%;
    }
    
    .portfolio-modal-body {
        flex-direction: column;
    }
    
    .portfolio-modal-gallery {
        flex: 0 0 60vh;
    }
    
    .portfolio-modal-content {
        flex: 1;
        max-height: 35vh;
        min-width: auto;
        max-width: none; /* Remove max-width constraint on tablet/mobile */
    }
}

@media (max-width: 768px) {
    .portfolio-overlay {
        padding: 0;
        align-items: flex-start;
    }
    
    .portfolio-modal-fullpage {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .portfolio-modal-header {
        padding: 1rem 1.5rem;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .portfolio-modal-header-content {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .portfolio-modal-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0;
    }
    
    .portfolio-modal-body {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Gallery section - fixed height, no scrolling */
    .portfolio-modal-gallery {
        flex: 0 0 50vh;
        height: 50vh;
        min-height: 50vh;
        max-height: 50vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        flex-shrink: 0;
        background: #f5f5f5;
        border-bottom: 2px solid #e8e8e8;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .portfolio-modal-main-image,
    #modal-main-image-container {
        flex: 1;
        min-height: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: auto;
        position: relative;
        background: #ffffff;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y pinch-zoom;
        padding: 0;
        margin: 0;
    }
    
    .portfolio-modal-main-image img,
    #modal-main-image-container img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .portfolio-modal-thumbnails {
        padding: 0.75rem;
        flex-shrink: 0;
        background: #ffffff;
        border-top: 1px solid #e8e8e8;
        height: auto;
        min-height: auto;
    }
    
    .portfolio-modal-thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .portfolio-modal-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Content section - takes remaining space and scrolls */
    .portfolio-modal-content {
        flex: 1;
        padding: 1.5rem;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        background: #ffffff;
        position: relative;
        touch-action: pan-y;
    }
    
    /* Prevent body scroll when modal is open on mobile */
    .portfolio-overlay.is-active {
        touch-action: none;
    }
    
    /* Allow touch interactions on image container even when overlay blocks touches */
    .portfolio-overlay.is-active .portfolio-modal-main-image,
    .portfolio-overlay.is-active #modal-main-image-container {
        touch-action: pan-x pan-y pinch-zoom !important;
    }
    
    .portfolio-modal-fullpage {
        touch-action: pan-y;
    }
    
    .portfolio-modal-gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .portfolio-modal-gallery-nav.prev {
        left: 10px;
    }
    
    .portfolio-modal-gallery-nav.next {
        right: 10px;
    }
}

/* Enhanced Filters UI */
.filters-wrap { 
    margin-bottom: 2rem; 
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.filters-wrap .field + .field { 
    margin-top: 1.25rem; 
}

/* Enhanced search input - generous left padding so icon doesn't sit against text */
.filters-wrap .control.has-icons-left .input,
.filters-wrap .input {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem 0.75rem 3.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.filters-wrap .input:focus {
    border-color: #1d469b;
    box-shadow: 0 0 0 3px rgba(29, 70, 155, 0.1);
    outline: none;
}

.filters-wrap .control.has-icons-left .icon {
    left: 0.75rem;
    color: #6b7280;
}

/* Enhanced tag buttons */
.tag-buttons { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.75rem; 
}
.tag-buttons .button { 
    font-size: 0.9rem; 
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #4b5563;
    transition: all 0.2s ease;
}
.tag-buttons .button:hover {
    border-color: #1d469b;
    color: #1d469b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(29, 70, 155, 0.15);
}
.tag-buttons .button.is-active {
    background-color: #1d469b;
    border-color: #1d469b;
    color: #fff;
    box-shadow: 0 2px 8px rgba(29, 70, 155, 0.25);
}
.tag-buttons .button.is-active:hover {
    background-color: #153570;
    border-color: #153570;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 70, 155, 0.3);
}

/* Enhanced empty states */
.no-results { 
    padding: 3rem 1rem; 
    color: #6b7280; 
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}
.no-results::before {
    content: '🔍';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading { 
    text-align: center; 
    padding: 4rem 2rem;
    color: #6b7280;
}
.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #1d469b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-top: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message { 
    padding: 2rem; 
    color: #dc3545; 
    text-align: center;
    background: #fef2f2;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

/* Enhanced pagination */
.pagination {
    margin-top: 3rem;
}

.pagination-link,
.pagination-previous,
.pagination-next {
    border-radius: 8px;
    border-color: #e5e7eb;
    transition: all 0.2s ease;
}

.pagination-link:hover,
.pagination-previous:hover,
.pagination-next:hover {
    border-color: #1d469b;
    color: #1d469b;
    background: rgba(29, 70, 155, 0.05);
}

.pagination-link.is-current {
    background: #1d469b;
    border-color: #1d469b;
    color: white;
}

/* Grid spacing improvements */
#trabalhosColumns .columns {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    margin-top: -0.75rem;
}

#trabalhosColumns .column {
    padding: 0.75rem;
}

/* Section title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

/* Section description */
.section-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
    .section-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .filters-wrap {
        padding: 1rem;
    }
}
