/*
Theme Name: Antarte Museum
Theme URI: https://antarte.pt
Author: Antarte
Author URI: https://antarte.pt
Description: Tema personalizado para o Antarte Museum - Edição Especial.
Version: 2.16
Text Domain: antarte-museum
*/

:root {
    --primary-color: #1B5E3C;
    /* Dark Green */
    --secondary-color: #E2AD50;
    /* Gold */
    --accent-color: #E2AD50;
    --alternative-color: #000000;
    --background-color: #ffffff;
    --text-color: #333333;
    --light-gray: #f9f9f9;
    --border-color: #e0e0e0;
    --main-font: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --alternative-color: #ffffff;
    --background-color: #121212;
    --text-color: #f0f0f0;
    --light-gray: #1e1e1e !important;
    --border-color: #333333;
}

body.dark-mode section[style*="background: var(--light-gray)"] {
    background-color: var(--light-gray) !important;
}

body.dark-mode * {
    border-color: var(--border-color);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
    /* Force straight edges everywhere */
}

/* Force Rounded Edges ONLY for the Toggle Switch */
.theme-switch,
.theme-switch *,
.news-slider .swiper-pagination-bullet,
.photo-slider .swiper-pagination-bullet {
    border-radius: 100px !important;
}

body {
    font-family: var(--main-font);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--alternative-color);
    line-height: 1.2;
}

.title-large {
    font-size: 3.5rem;
    text-transform: uppercase;
}

/* Unified Section Titles */
h2.section-title,
.title-medium,
.section-title-side {
    font-size: 1.8rem;
    /* Reduced from 2.2rem */
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    /* Reduced from 50px */
    position: relative;
    display: block;
    width: 100%;
}

.section-title-side {
    font-size: 1.8rem;
    /* Keep side titles slightly smaller if needed, or unify */
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Unified Layout Utilities */
.section-split {
    display: grid;
    grid-template-columns: 3fr 7fr;
    /* Consistent 30/70 split */
    gap: 80px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .section-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.section-title-side {
    color: var(--secondary-color);
    font-size: 1.8rem;
    line-height: 1.2;
}

.content-block p {
    margin-bottom: 30px;
    font-size: 1.15rem;
    line-height: 1.8;
}

.content-block p:last-child {
    margin-bottom: 0;
}

/* Header */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--background-color);
    z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    /* Increased height for breathability */
}

.logo {
    position: relative;
    z-index: 1010;
}

.logo a {
    font-size: 1.35rem;
    /* Reduced from 1.5rem */
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

body.dark-mode .logo a {
    color: var(--secondary-color);
}

/* Toggle & Hamburger Container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    /* Slight negative margin to align visually with image edge */
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--primary-color);
    line-height: 1;
}

#mobile-menu-close {
    display: none;
}

body.dark-mode .menu-toggle {
    color: var(--secondary-color);
}

/* Desktop Navigation */
nav#site-navigation ul {
    display: flex;
    gap: 35px;
    /* Increased gap for desktop */
}

nav#site-navigation a {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
}

body.dark-mode nav#site-navigation a:hover {
    color: var(--secondary-color);
}

nav#site-navigation a:hover {
    color: var(--secondary-color);
}

#site-header.scrolled {
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 110px 20px 0 20px;
    /* 90px header height + 20px gap to match image spacing */
}

.hero-container img {
    margin-bottom: 20px;
    width: 100%;
}

/* Forms Styling */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--background-color);
    padding: 60px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    font-family: var(--main-font);
    font-size: 1rem;
    outline: none;
    background: var(--background-color);
    color: var(--text-color);
    box-sizing: border-box;
}

input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 52px;
    position: relative;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231B5E3C"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

body.dark-mode input[type="date"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z"/></svg>');
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
}

.btn-submit {
    background: var(--secondary-color);
    color: white !important;
    padding: 18px 30px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* News Slider */
.news-slider {
    padding: 40px 0 80px 0;
}

.news-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.news-card-image {
    width: 100%;
    height: 160px; /* Mobile */
    object-fit: cover;
}

@media (min-width: 769px) {
    .news-card-image {
        height: 200px; /* Desktop */
    }
}

.news-card-content {
    padding: 15px; /* Mobile */
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (min-width: 769px) {
    .news-card-content {
        padding: 25px; /* Desktop */
    }
}

.news-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em; /* Garante 2 linhas de altura e ativa as reticências */
}

@media (min-width: 769px) {
    .news-card h3 {
        font-size: 1.15rem;
        min-height: 2.6em; 
    }
}

body.dark-mode .news-card h3 {
    color: var(--secondary-color);
}

.news-card p {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8em; /* Garante 3 linhas de altura e ativa as reticências */
}

@media (min-width: 769px) {
    .news-card p {
        font-size: 0.95rem;
        min-height: 5.2em;
    }
}

.news-card .date {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

#back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

#back-to-top.visible {
    display: flex;
}

/* Theme Toggle Elegant Switch - Monocromático Verde Antarte */
.theme-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e4e4e4;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    transition: background-color 0.3s;
    margin-right: 0;
    border-radius: 100px !important;
}

body.dark-mode .theme-switch {
    background: #333;
}

.theme-switch .toggle-circle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    /* Verde Antarte #1B5E3C */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-radius: 50% !important;
}

body.dark-mode .theme-switch .toggle-circle {
    transform: translateX(30px);
}

.theme-switch .icon {
    font-size: 14px;
    z-index: 3;
    pointer-events: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, opacity 0.30s;
    color: #888;
}

body.dark-mode .theme-switch .icon {
    color: #999;
}

.theme-switch .icon.active {
    color: #fff !important;
    opacity: 1;
}

.theme-switch .icon:not(.active) {
    opacity: 0.6;
}

/* Notifications */
#notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 20px 30px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    font-weight: 600;
    transform: translateY(100px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#notification-toast.show {
    transform: translateY(0);
}

#notification-toast.success {
    border-left: 5px solid var(--secondary-color);
    color: var(--primary-color);
}

#notification-toast.error {
    border-left: 5px solid #d32f2f;
    color: #d32f2f;
}

.social-links a:hover {
    color: var(--secondary-color);
}

body.dark-mode .theme-switch .icon:not(.active) {
    color: #777;
}

body.dark-mode .theme-switch .icon.moon {
    color: white !important;
    opacity: 1 !important;
}

body.dark-mode .theme-switch .icon.sun {
    color: #555 !important;
    opacity: 0.4 !important;
}

/* Mobile Menu Styles */
@media (max-width: 1024px) {
	
	.header-actions {
    margin-right: 0 !important; /* Removemos a margem que o puxava para fora */
	flex: 1; /* Permite que o container ocupe o espaço disponível */
    justify-content: flex-end;
}
	
	.header-actions .theme-switch {
    margin: 0 auto; /* Centra o botão no espaço livre entre o logo e o menu */
}

	.menu-toggle {
    margin-right: 0;
}

    /* Increased breakpoint for complex menu */
    .header-wrapper {
        height: 70px;
    }

    .logo a {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    nav#site-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--background-color);
        color: var(--text-color);
        z-index: 999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
    }

    .menu-toggle {
        display: block;
        /* Visible on mobile */
    }

    #site-navigation.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    }

    body.dark-mode #site-navigation.active {
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    #site-navigation ul {
        flex-direction: column;
        gap: 30px;
    }

    #site-navigation a:hover {
        color: var(--secondary-color) !important;
    }

    #mobile-menu-toggle.active span {
        color: var(--secondary-color);
    }

    #mobile-menu-close {
        display: none;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
        color: var(--primary-color);
        cursor: pointer;
        z-index: 1001;
    }

    body.dark-mode #mobile-menu-close {
        color: var(--secondary-color);
    }

    #site-navigation.active #mobile-menu-close {
        display: block !important;
    }
	
	/* REORDENAÇÃO 27 ANOS (v2.27 - Rev 3): Texto ACIMA das fotos no telemóvel */
#espaco .section-split, 
#historia .section-split {
    display: flex !important;
    flex-direction: column-reverse !important;
}

#espaco .section-split .title-col,
#historia .section-split .title-col {
    margin-top: 30px; /* Dá espaço entre as fotos e o texto */
}
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.2rem;
    }
}

body.dark-mode iframe[src*="maps.google.com"], body.dark-mode iframe[src*="google.com/maps"] {
    filter: grayscale(100%) invert(90%) hue-rotate(180deg) brightness(0.8) !important;
}

/* Global Section Spacing */
section {
    padding: 80px 0;
}

#hero,
#inicio {
    padding: 0;
}

.container img {
    margin-bottom: 40px;
}

.container img:last-child {
    margin-bottom: 0;
}

/* Info Grid (Visit & Contacts) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 120px;
    margin-top: 60px;
}

.info-item h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.info-item p {
    margin-bottom: 12px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    section {
        padding: 35px 0;
    }
	
	/* 2. Títulos com menos espaço */
    h2.section-title,
    .title-medium,
    .section-title-side {
        margin-bottom: 25px !important;
    }
	
    /* 3. Texto com menos intervalo */
    .content-block p {
        margin-bottom: 20px !important;
    }
	
    /* 4. Imagens com menos margem */
    .container img {
        margin-bottom: 15px;
    }

    .container img {
        margin-bottom: 25px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .form-container {
        padding: 30px 20px;
    }

    .form-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .footer-content {
        flex-direction: column;
        justify-content: center !important;
        text-align: center;
        gap: 20px !important;
    }

    .social-links {
        justify-content: center;
    }
}

#noticias {
    padding: 100px 0;
}

#noticias .title-medium {
    margin-bottom: 60px;
    text-align: center;
    width: 100%;
}

footer {
    padding: 40px 0;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    text-align: center;
    transition: background-color 0.3s;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
}

.photo-slider {
    padding: 20px 0 80px 0; /* Aumentado para dar espaço aos pontos */
}

.photo-slider .swiper-pagination {
    bottom: 0 !important; /* Coloca os pontos no fundo, fora da imagem */
}

.gallery-item img {
    width: 100%;
    height: 500px; /* Mobile */
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (min-width: 769px) {
    .gallery-item img {
        height: 650px; /* Desktop */
    }
}