body {
    font-family: 'Inter', sans-serif;
}

/* ====================================
   IMAGE LOADING OPTIMIZATION
   ==================================== */

/* Image wrapper placeholder - simple background only, no animation */
.img-skeleton {
    position: relative;
    background: #e2e8f0;
    overflow: hidden;
}

/* Dark theme placeholder */
.img-skeleton-dark {
    position: relative;
    background: #1e3a5f;
    overflow: hidden;
}

/* Lazy loaded images - show immediately, no blur effect */
img[loading="lazy"] {
    opacity: 1;
}

#main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: transform 0.3s ease-in-out;
    overflow: visible;
}

.header-hidden {
    transform: translateY(-100%);
}

#main-header nav {
    position: relative;
    z-index: 60;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-input {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.search-input::placeholder {
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-toggle.active-dropdown-toggle {
    background-color: #f3f4f6;
    color: #1f2937;
    font-weight: 700;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    position: relative;
    z-index: 10;
    margin-bottom: -1px;
    padding-bottom: calc(0.75rem + 1px);
}

.geral-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

.geral-menu-item.concursos:hover,
.geral-menu-item.concursos.active {
    background-color: rgba(0, 113, 206, 0.1);
}

.geral-menu-item.concursos:hover span,
.geral-menu-item.concursos.active span {
    color: rgb(0, 113, 206);
}

.geral-menu-item.militares:hover,
.geral-menu-item.militares.active {
    background-color: rgba(34, 197, 94, 0.1);
}

.geral-menu-item.militares:hover span,
.geral-menu-item.militares.active span {
    color: #22c55e;
}

.geral-menu-item.oab:hover,
.geral-menu-item.oab.active {
    background-color: rgba(234, 179, 8, 0.1);
}

.geral-menu-item.oab:hover span,
.geral-menu-item.oab.active span {
    color: #eab308;
}

.geral-menu-item.vestibular:hover,
.geral-menu-item.vestibular.active {
    background-color: rgba(168, 85, 247, 0.1);
}

.geral-menu-item.vestibular:hover span,
.geral-menu-item.vestibular.active span {
    color: #a855f7;
}

#mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

#mobile-menu.open {
    transform: translateX(0);
}

.mobile-submenu {
    display: none;
    padding-left: 1rem;
}

/* Carousel Styles */
.carousel-container {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
}

.carousel-item {
    flex-shrink: 0;
}

.carousel-dots span.active {
    background-color: white;
}

/* Banner Carousel - Full width, height never cropped, width cropped on small screens */
#carousel-wrapper {
    width: 100%;
    overflow: hidden;
}

#main-carousel-track {
    height: auto;
    display: flex;
}

/* Each carousel item */
#main-carousel-track .carousel-item {
    flex-shrink: 0;
    width: 100%;
}

/* Image: fills width on large screens, crops width on small screens, never crops height */
#main-carousel-track .carousel-item img {
    display: block;
    width: 1920px;
    /* Fixed width - same as original banner */
    max-width: none !important;
    /* Override Tailwind's max-width: 100% */
    height: auto;
    /* Height scales proportionally - never cropped */
    /* Centering is handled by parent's flex justify-center */
}

/* ==============================================
   RESPONSIVE BANNERS - Desktop vs Mobile
   Desktop: 1920x768 - NEVER crop height, center horizontally
   Mobile: 1080x1440 (3:4 ratio) - fill viewport
   ============================================== */

/* Mobile ONLY: Use mobile banner with vertical aspect ratio */
@media (max-width: 768px) {
    #main-carousel {
        aspect-ratio: 3 / 4;
        max-height: 80vh;
        overflow: hidden;
    }

    #carousel-wrapper,
    #main-carousel-track {
        height: 100%;
    }

    #main-carousel-track .carousel-item,
    #main-carousel-track .carousel-item a {
        height: 100%;
    }

    #main-carousel-track .carousel-item img,
    #main-carousel-track .carousel-item picture {
        width: 100% !important;
        height: 100%;
        object-fit: cover;
    }

    #main-carousel-track .carousel-item picture img {
        width: 100% !important;
        height: 100%;
        object-fit: cover;
    }
}

/* Desktop: Keep ORIGINAL behavior - NO cropping, centered */
@media (min-width: 769px) {

    /* No aspect-ratio! Let height be auto based on image */
    #main-carousel {
        /* aspect-ratio removed - let image determine height */
    }

    /* Restore original picture/img behavior */
    #main-carousel-track .carousel-item picture {
        display: contents;
        /* Don't affect layout */
    }

    #main-carousel-track .carousel-item picture img {
        display: block;
        width: 1920px;
        max-width: none !important;
        height: auto;
        /* NEVER crop height */
        /* Centering handled by parent's flex justify-center */
    }
}

/* ==============================================
   COURSE CARDS - Proportional Sizing
   Calculated from user requirements:
   Desktop: maintain 600:320 ratio (1.875)
   Mobile: maintain 425:320 ratio (1.328)
   ============================================== */

/* Course card base styles */
.course-card {
    width: 100%;
    /* Fill available grid/carousel space */
}

/* Common image container styles */
.course-card .h-48,
.course-card .h-52 {
    height: auto !important;
    /* Override Tailwind fixed heights */
    overflow: hidden;
}

.course-card .h-48 img,
.course-card .h-52 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin-left: 0;
    /* Reset any negative margins */
}

/* Desktop: Aspect Ratio 600/320 */
@media (min-width: 769px) {

    .course-card .h-48,
    .course-card .h-52 {
        aspect-ratio: 600 / 320;
    }
}

/* Mobile: Aspect Ratio 425/320 */
@media (max-width: 768px) {

    .course-card .h-48,
    .course-card .h-52 {
        aspect-ratio: 425 / 320;
    }
}

/* Animação da Caneta */
.escolhe-wrapper {
    position: relative;
    display: inline-block;
}

.escolhe-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160%;
    height: 800%;
    transform: translate(-50%, -50%);
    overflow: visible;
}

.escolhe-path {
    stroke: red;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    animation: draw-circle 2.5s ease-in-out infinite;
}

@keyframes draw-circle {
    0% {
        stroke-dashoffset: 1500;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -1500;
    }
}

/* Professor Card Hover Effect */
.professor-card {
    transition: transform 0.3s ease;
    z-index: 1;
}

.professor-card-wrapper:hover .professor-card {
    transform: scale(1.1);
    z-index: 10;
}

.professor-card .prof-img {
    transition: transform 0.3s ease;
}

.professor-card-wrapper:hover .prof-img {
    transform: scale(1.05);
}

.professor-card .prof-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.professor-card-wrapper:hover .prof-details {
    max-height: 200px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

/* Parallax Section */
.parallax-bg {
    background-image: url('images/optimized/parallax/bg1-lg.webp');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    transition: background-image 1s ease-in-out;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.parallax-content {
    position: relative;
    z-index: 2;
}

/* Testimonial Carousel Item */
#testimonial-track .carousel-item {
    width: 33.333%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #testimonial-track .carousel-item {
        width: 100%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

/* Mobile Professor Carousel - Touch Swipe Support */
@media (max-width: 768px) {
    #professor-carousel-mobile {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        /* Firefox */
        -ms-overflow-style: none !important;
        /* IE/Edge */
    }

    #professor-carousel-mobile::-webkit-scrollbar {
        display: none !important;
        /* Chrome/Safari */
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }

    #professor-track-mobile {
        display: flex;
    }

    #professor-track-mobile>a {
        scroll-snap-align: center;
        flex-shrink: 0;
        width: 100%;
    }

    /* Fix professor photo cropping - show more of the face */
    /* object-position controlado via JS imagePosition */
}

/* ==============================================
   WHATSAPP FLOATING BUTTON
   ============================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-float-btn {
    --whatsapp-color: #25D366;
    --whatsapp-shadow: rgba(37, 211, 102, 0.4);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--whatsapp-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--whatsapp-shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px var(--whatsapp-shadow);
    }

    50% {
        box-shadow: 0 6px 35px var(--whatsapp-shadow);
    }
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px var(--whatsapp-shadow);
    animation: none;
}

.whatsapp-float-btn i {
    font-size: 28px;
    color: white;
}

.whatsapp-float-label {
    background: white;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-float-label {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float-btn {
        width: 56px;
        height: 56px;
    }

    .whatsapp-float-btn i {
        font-size: 26px;
    }

    .whatsapp-float-label {
        display: none;
    }
}

/* ==============================================
   COURSE DETAIL MODAL
   ============================================== */
.course-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.course-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.course-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.course-modal-overlay.active .course-modal-content {
    transform: translateY(0) scale(1);
}

.course-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 10;
}

.course-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.course-modal-header {
    display: flex;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.course-modal-image {
    width: 200px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.course-modal-info {
    flex: 1;
}

.course-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.course-modal-category {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.course-modal-meta {
    display: flex;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
}

.course-modal-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-modal-body {
    padding: 24px;
}

.course-modal-description {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 24px;
}

.course-modal-benefits {
    margin-bottom: 24px;
}

.course-modal-benefits h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.course-modal-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.course-modal-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 14px;
    color: #166534;
}

.course-modal-benefit i {
    color: #22c55e;
}

.course-modal-footer {
    padding: 24px;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
}

.course-modal-price {
    text-align: center;
    margin-bottom: 16px;
}

.course-modal-price-original {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 14px;
}

.course-modal-price-promo {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
}

.course-modal-installments {
    font-size: 14px;
    color: #6b7280;
}

.course-modal-cta {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgb(0, 113, 206) 0%, #0056a3 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.course-modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 113, 206, 0.4);
}

@media (max-width: 768px) {
    .course-modal-header {
        flex-direction: column;
        gap: 16px;
    }

    .course-modal-image {
        width: 100%;
        height: 180px;
    }

    .course-modal-benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   NEWSLETTER POPUP
   ============================================== */
.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.newsletter-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.newsletter-popup-content {
    background: white;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.newsletter-popup-overlay.active .newsletter-popup-content {
    transform: translateY(0) scale(1);
}

.newsletter-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    transition: all 0.2s ease;
    z-index: 10;
}

.newsletter-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.newsletter-popup-header {
    padding: 32px 24px 24px;
    text-align: center;
    color: white;
}

.newsletter-popup-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.newsletter-popup-icon i {
    font-size: 28px;
}

.newsletter-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-popup-text {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

.newsletter-popup-form {
    padding: 24px;
    background: white;
}

.newsletter-popup-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    outline: none;
}

.newsletter-popup-input:focus {
    border-color: rgb(0, 113, 206);
    box-shadow: 0 0 0 3px rgba(0, 113, 206, 0.1);
}

.newsletter-popup-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newsletter-popup-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.newsletter-popup-dismiss {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.newsletter-popup-dismiss:hover {
    color: #1f2937;
}

/* ==============================================
   QUESTÕES MODAL (COMING SOON)
   ============================================== */
.questoes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.questoes-modal-overlay.active,
.questoes-modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.questoes-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.questoes-modal-content {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    border-radius: 20px;
    max-width: 450px;
    width: 100%;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 25px 60px -12px rgba(245, 158, 11, 0.4);
    text-align: center;
    padding: 32px 24px;
}

.questoes-modal-overlay.active .questoes-modal-content,
.questoes-modal-overlay:not(.hidden) .questoes-modal-content {
    transform: translateY(0) scale(1);
}

.questoes-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1f2937;
    transition: all 0.2s ease;
    z-index: 10;
}

.questoes-modal-close:hover {
    background: rgba(0, 0, 0, 0.25);
}

.questoes-modal-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.questoes-modal-icon i {
    font-size: 32px;
    color: #1f2937;
}

.questoes-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.questoes-modal-text {
    font-size: 15px;
    color: #44403c;
    line-height: 1.6;
    margin-bottom: 24px;
}

.questoes-modal-form {
    background: white;
    padding: 24px;
    border-radius: 16px;
    margin-top: 8px;
}

.questoes-modal-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    outline: none;
    background: #f9fafb;
}

.questoes-modal-input:focus {
    border-color: #f59e0b;
    background: white;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.questoes-modal-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.questoes-modal-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

@media (max-width: 480px) {
    .questoes-modal-content {
        padding: 24px 16px;
    }

    .questoes-modal-title {
        font-size: 1.3rem;
    }

    .questoes-modal-form {
        padding: 16px;
    }
}