/* ==========================================================================
   Paço do Curutelo — Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.navbar {
    padding: 20px 0;
}

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

.logo a {
    text-decoration: none;
    color: #8B7355;
    font-weight: bold;
    font-size: 20px;
    line-height: 1.2;
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8B7355;
    transition: width 0.3s;
}

.main-menu a:hover::after,
.main-menu .current-menu-item > a::after {
    width: 100%;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
    color: #8B7355;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Toggle animado quando aberto */
.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

main {
    margin-top: 80px;
}

/* --------------------------------------------------------------------------
   MOBILE NAVIGATION
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .main-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 999;
        font-size: 1.5rem;
    }

    .main-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
    background: #2c2c2c;
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-weight: bold;
    font-size: 20px;
    color: #C9A961;
    margin-bottom: 20px;
    line-height: 1.2;
}

.footer-col h3 {
    margin-bottom: 20px;
    color: white;
    font-size: 1.1rem;
}

.footer-col p {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 14px;
}

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

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

.footer-menu a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-menu a:hover {
    color: #C9A961;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --------------------------------------------------------------------------
   FORMULÁRIO DE CONTACTO
   -------------------------------------------------------------------------- */

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
    color: #333;
    margin-bottom: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #8B7355;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.15);
}

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

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

/* --------------------------------------------------------------------------
   PAGINAÇÃO
   -------------------------------------------------------------------------- */

.nav-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 0;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links .current {
    background: #8B7355;
    color: white;
    border-color: #8B7355;
}

/* --------------------------------------------------------------------------
   NOTIFICAÇÕES / ALERTS
   -------------------------------------------------------------------------- */

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

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

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --------------------------------------------------------------------------
   LIGHTBOX / GALERIA
   -------------------------------------------------------------------------- */

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    background: none;
    border: none;
}

.lightbox-close:hover {
    color: #C9A961;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* --------------------------------------------------------------------------
   SCROLL TO TOP
   -------------------------------------------------------------------------- */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #8B7355;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 500;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top:hover {
    transform: translateY(-3px);
    background: #6B5644;
}

/* --------------------------------------------------------------------------
   ANIMAÇÕES DE ENTRADA
   -------------------------------------------------------------------------- */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   UTILITÁRIOS ADICIONAIS
   -------------------------------------------------------------------------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

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

/* Alinhamentos WordPress padrão */
.alignleft  { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 0 auto 20px; }
.alignwide  { width: 100%; }
