/* Reset e Variáveis baseadas no site original */
:root {
    --primary: #3082ae;
    --secondary: #3a3a3a;
    --accent: #07719E;
    --light: #F5F5F5;
    --dark: #212529;
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
    --border-color: #dddddd;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Header e Navegação */
header {
    background: linear-gradient(135deg, var(--primary), #1a4b8c);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

header.scrolled {
    padding: 0;
    background: rgba(48, 130, 174, 0.95);
    backdrop-filter: blur(10px);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-top {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.header-contact span {
    margin-right: 20px;
}

.header-contact i {
    margin-right: 5px;
}

.header-social a {
    color: white;
    margin-left: 15px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.header-social a:hover {
    color: #FFD166;
    transform: translateY(-2px);
}

.header-main {
    padding: 15px 0;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.logo img {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

.logo-text h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-family: 'Playfair Display', serif;
    transition: var(--transition);
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
    font-size: 16px;
}

nav a:hover {
    color: #FFD166;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FFD166;
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu:hover {
    color: #FFD166;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(48, 130, 174, 0.85), rgba(26, 75, 140, 0.9)), url('/frontend/img/Novas\ instalações\ do\ IPS.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("/img/Corpo\ Directivo.jpg");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin: 0 auto 2.5rem;
    max-width: 700px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background-color: #065a82;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
}

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

/* Seções */
section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.4rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: #555;
    font-size: 1.1rem;
}

/* Destaques */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.highlight-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, var(--primary), #1a4b8c);
    transition: var(--transition);
    z-index: 0;
    opacity: 0.05;
}

.highlight-card:hover::before {
    height: 100%;
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.highlight-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.highlight-card:hover .highlight-icon {
    transform: scale(1.1);
    color: var(--accent);
}

.highlight-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    position: relative;
    z-index: 1;
}

.highlight-card p {
    position: relative;
    z-index: 1;
}

/* Sobre Nós */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
    background: linear-gradient(rgba(48, 130, 174, 0.3), rgba(26, 75, 140, 0.5)), url('/img/Novas\ instalações\ do\ IPS.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    transition: var(--transition);
}

.about-image:hover {
    transform: scale(1.02);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1rem;
    color: var(--secondary);
}

/* Cursos */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    animation: fadeIn 0.8s ease-out;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.course-img {
    height: 180px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.course-card:hover .course-img {
    transform: scale(1.05);
}

.course-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.course-content {
    padding: 25px;
}

.course-content h3 {
    margin-bottom: 10px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

/* Versão aprimorada dos cards com imagem real */
.course-media {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f3f6f8;
}

.course-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.course-card:hover .course-media img {
    transform: scale(1.05);
}

.course-media .course-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.course-card-enhanced .course-content {
    padding: 24px;
}

.course-info p {
    margin: 8px 0;
    color: #444;
    font-size: 0.95rem;
}

.course-actions a,
.course-actions button {
    margin-right: 10px;
}

/* Modal de curso aprimorado */
.course-modal-header {
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.course-modal-body {
    padding: 20px;
}

.course-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Parceiros */
.partners-section {
    background: linear-gradient(180deg, rgba(250,250,250,1), rgba(245,248,250,1));
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
    align-items: center;
    margin-top: 20px;
}

.partner-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.partner-card img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: saturate(0.95);
}

.partner-card h4 {
    font-size: 0.95rem;
    color: var(--secondary);
    text-align: center;
}

.partner-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(16,24,40,0.12);
}

/* Melhor contraste para texto em seções claras */
.section-title p, .course-content p, .about-text p {
    color: #444;
}

/* Pequenos ajustes responsivos */
@media (max-width: 768px) {
    .course-media { height: 160px; }
    .partners-grid { gap: 14px; }
}

.course-content p {
    color: #666;
    margin-bottom: 20px;
}

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

.gallery-item {
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Notícias */
.news-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.featured-news {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.featured-news:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.featured-img {
    height: 300px;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('/img/Inauguração\ do\ polo\ universitário\ pelo\ Presidente\ João\ Lourenço.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-content {
    padding: 25px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-img {
    width: 120px;
    min-height: 100px;
    background-color: var(--primary);
}

.news-content {
    padding: 15px;
    flex: 1;
}

.news-content h4 {
    margin-bottom: 8px;
    color: var(--primary);
}

.news-date {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Números */
.stats {
    background: linear-gradient(135deg, var(--primary), #1a4b8c);
    color: white;
    text-align: center;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("/img/Infraestrutura\ académica.jpg");
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.stat-item {
    padding: 20px;
}

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Contacto */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    background: var(--accent);
    transform: scale(1.1);
}

.contact-text h4 {
    margin-bottom: 5px;
    color: var(--primary);
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(48, 130, 174, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 3rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Links rápidos */
.quick-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 2rem;
}

.quick-link {
    background: white;
    padding: 15px 25px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.quick-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-title {
    margin-bottom: 20px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
}

/* Galeria Modal */
.gallery-modal .modal-content {
    max-width: 90%;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.gallery-modal img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

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

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

.gallery-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 0 0 10px 10px;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Novos elementos adicionados */
        
/* Barra de pesquisa */
.search-container {
    position: relative;
    margin-left: 20px;
}

.search-box {
    padding: 8px 15px;
    border-radius: 30px;
    border: none;
    width: 200px;
    transition: var(--transition);
}

.search-box:focus {
    outline: none;
    width: 250px;
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
}
        
/* Carrossel de notícias */
.news-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.carousel-slide {
    min-width: 100%;
    padding: 20px;
    background: white;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--primary);
}
        
/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    background: #f8f9fa;
    margin-bottom: 30px;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    gap: 10px;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 10px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}
        
/* Alertas */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
        
/* Progress bar */
.progress-bar {
    height: 5px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}
        
/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Responsividade */
@media (max-width: 1200px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-image {
        height: 300px;
    }
}

@media (max-width: 992px) {
    .news-container {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-container {
        display: none;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .header-top-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-contact span {
        margin-right: 10px;
        margin-bottom: 5px;
        display: inline-block;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }
    
    .carousel-nav {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 576px) {
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }

    .quick-links {
        flex-direction: column;
        align-items: center;
    }

    .quick-link {
        width: 100%;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
    }
}

/* Screen Reader Only - para acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Indicador de scroll */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Filtro de cursos */
.courses-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

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

/* Meta informações dos cursos */
.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Call to Action para cursos */
.courses-cta {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Botão pequeno */
.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Mapa placeholder */
.map-container {
    margin-top: 30px;
}

.map-placeholder {
    background: #f8f9fa;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: #666;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

/* Validação de formulário */
.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.form-control.error {
    border-color: var(--danger);
}

/* Newsletter no footer */
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Links do footer */
.footer-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: white;
    padding: 15px;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    margin-right: 20px;
}

.cookie-content a {
    color: var(--accent);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-spinner.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Visual upgrades adicionais */
:root {
    --cta-start: #2b8fb6;
    --cta-end: #0f4f7a;
    --glass: rgba(255,255,255,0.6);
}

/* Tipografia mais refinada */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.5px;
}

.logo-text h1 {
    font-size: 1.6rem;
    letter-spacing: -0.6px;
}

.hero h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

/* CTA com gradiente e sombreamento */
.btn {
    background: linear-gradient(90deg, var(--cta-start), var(--cta-end));
    box-shadow: 0 8px 30px rgba(15,79,122,0.18);
}

.btn-secondary {
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
}

.btn:hover {
    transform: translateY(-4px) scale(1.01);
}

/* Cartões com profundidade e acento lateral */
.course-card-enhanced {
    border-left: 6px solid rgba(48,130,174,0.95);
    overflow: visible;
}

.course-card-enhanced::after {
    content: '';
    position: absolute;
    right: -40px;
    top: 20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(48,130,174,0.06), rgba(10,30,60,0.02));
    border-radius: 12px;
    transform: rotate(12deg);
    pointer-events: none;
}

.course-content h3 { color: #0f3b57; }

/* Badges e microinterações */
.course-badge {
    background: rgba(255,255,255,0.12);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(15,79,122,0.12);
}

.highlight-card, .partner-card {
    transition: transform 0.45s cubic-bezier(.2,.9,.2,1), box-shadow 0.45s ease;
}

/* Parceiros: grayscale -> color on hover */
.partner-card img {
    filter: grayscale(1) contrast(0.95) brightness(0.98);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.partner-card:hover img {
    filter: none;
    transform: scale(1.03);
}

/* Modal com efeito glass e borda sutil */
.modal {
    background-color: rgba(8, 12, 20, 0.7);
}

.modal-content {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,252,0.95));
    border: 1px solid rgba(15,79,122,0.06);
}

/* Form controls com foco mais visível */
.form-control:focus {
    box-shadow: 0 6px 20px rgba(48,130,174,0.14);
    border-color: var(--cta-end);
}

/* Pequenas melhorias em ícones e links */
.highlight-icon, .contact-icon, .social-icons a {
    transition: transform 0.25s ease, color 0.25s ease;
}

.highlight-icon:hover, .contact-icon:hover, .social-icons a:hover {
    transform: translateY(-6px) scale(1.05);
}

/* Escurecer ligeiramente os textos secundários para melhor legibilidade */
.section-title p, .course-info p, .about-text p, .featured-content p {
    color: #333;
}

/* Tiny utility */
.muted { color: #6b7280; }

@media (max-width: 992px) {
    .course-card-enhanced::after { display: none; }
}

/* Estilos avançados para parceiros */
.partners-section {
    background: linear-gradient(180deg, rgba(240,245,250,1) 0%, rgba(248,250,252,1) 100%);
    padding: 6rem 0;
}

.partner-card {
    position: relative;
    overflow: hidden;
}

.partner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(48,130,174,0.03), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.partner-card:hover::before {
    opacity: 1;
}

.partner-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 100%;
}

.partner-card h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.partner-card:hover h4 {
    color: var(--primary);
}

/* Melhorias de animação de entrada */
.partner-card.animate-on-scroll {
    animation: slideInUp 0.6s ease-out;
}

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

/* Estilos para seção de notícias melhorados */
.carousel-slide {
    padding: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(250,252,254,0.95));
    border-radius: 10px;
    border: 1px solid rgba(48,130,174,0.08);
}

.carousel-slide h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
}

/* Melhorias em footer */
footer {
    background: linear-gradient(180deg, #1a2332 0%, #0f1319 100%);
}

.footer-column h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Melhorias em links rápidos */
.quick-link {
    font-size: 0.95rem;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.quick-link:hover {
    box-shadow: 0 8px 20px rgba(48,130,174,0.25);
}

/* Melhorias em estatísticas */
.stat-item {
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.stat-item:hover {
    transform: translateY(-8px);
}

.stat-item h3 {
    color: #fff;
    font-size: 2.8rem;
}

/* Melhorias em formulário de contacto */
.contact-form {
    box-shadow: 0 8px 30px rgba(48,130,174,0.12);
    border: 1px solid rgba(48,130,174,0.08);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(48,130,174,0.1);
}

/* Melhorias responsivas */
@media (max-width: 768px) {
    .partners-grid {
        gap: 12px;
    }
    
    .partner-card {
        padding: 14px;
    }
    
    .carousel-slide {
        padding: 20px;
    }
    
    .hero h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .partner-card img {
        max-width: 100px;
        max-height: 50px;
    }
    
    .quick-link {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
}

/* Animações adicionais */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Melhorias de acessibilidade */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Skip to main content para acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Melhorias de responsividade para tablets */
@media (max-width: 992px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-content p {
        margin-right: 0;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

/* Melhorias de responsividade para mobile */
@media (max-width: 768px) {
    .courses-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin-bottom: 10px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #005a9c;
        --secondary: #000000;
        --accent: #004578;
        --light: #ffffff;
        --dark: #000000;
    }
    
    .btn {
        border: 2px solid var(--primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Adições para melhor performance e design */
body {
    overscroll-behavior: none; /* Previne overscroll em mobile */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Melhoria no hero buttons para mobile */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Adicionado para mapa real */
.map-container iframe {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Form help text */
.form-help {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    display: block;
}