/* ==========================================================================
   Flores Do Meu Jardim - Main Stylesheet
   ========================================================================== */

/* Google Fonts imported in HTML, fallbacks defined here */
:root {
    --color-bg-main: #F5E9D4;      /* Creme suave de fundo */
    --color-bg-light: #FFF8E7;     /* Creme claro da navbar e intro */
    --color-primary: #5B8B6E;      /* Verde botânico escuro */
    --color-primary-hover: #4a7259;
    --color-secondary: #A8D5BA;    /* Verde suave dos botões e contatos */
    --color-text-dark: #3a5c48;
    --color-text-light: #FFF8E7;
    --color-white: #ffffff;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-footer: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --navbar-height-desktop: 130px;
    --navbar-height-mobile: 80px;
    --transition: all 0.3s ease;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Reset Global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-main);
    color: var(--color-primary);
    line-height: 1.6;
    min-width: 320px;
    overflow-x: hidden;
}

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

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

/* Seções principais com compensação para a navbar fixa */
.hero-section,
.intro-section,
.gallery-section,
.contacts-section {
    scroll-margin-top: var(--navbar-height-desktop);
    width: 100%;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    height: var(--navbar-height-desktop);
    width: 100%;
    background-color: var(--color-bg-light);
    padding: 10px 24px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

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

.navbar-logo {
    display: inline-block;
    line-height: 0;
}

.logo-img {
    height: 105px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-logo:hover .logo-img {
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    display: inline-block;
    padding: 8px 22px;
    border: 1px solid var(--color-bg-light);
    border-radius: 4px;
    background-color: var(--color-secondary);
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.nav-btn:hover {
    background-color: var(--color-bg-light);
    color: var(--color-primary);
    border-color: var(--color-secondary);
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.hamburger:focus-visible {
    outline: 2px solid var(--color-primary);
}

/* ==========================================================================
   Page Wrapper
   ========================================================================== */
.page-container {
    padding-top: var(--navbar-height-desktop);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.85);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.45) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-bg-light);
    padding: 20px;
    max-width: 900px;
    animation: fadeIn 1.2s ease-out;
}

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

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.hero-divider {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 4px 0;
    color: var(--color-secondary);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 400;
    margin-bottom: 28px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

/* Botão de Call to Action */
.cta-button {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 12px 28px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    border-radius: 4px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.cta-button:active {
    transform: translateY(0);
}

/* ==========================================================================
   Intro / Sobre Section
   ========================================================================== */
.intro-section {
    background-color: var(--color-bg-light);
    padding: 60px 24px;
    text-align: center;
}

.intro-container {
    max-width: 900px;
    margin: 0 auto;
}

.logo-letters {
    height: 85px;
    width: auto;
    margin: 0 auto 30px auto;
    object-fit: contain;
}

.intro-section p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-dark);
    margin-bottom: 18px;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-section {
    background-color: var(--color-bg-main);
    padding: 60px 24px;
    text-align: center;
}

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

.gallery-section h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 2.4rem;
    margin-bottom: 35px;
    position: relative;
    display: inline-block;
}

.gallery-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 3px solid var(--color-bg-light);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.05);
    aspect-ratio: 4 / 5;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(91, 139, 110, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: #fff;
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ==========================================================================
   Contacts Section
   ========================================================================== */
.contacts-section {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 50px 24px 30px 24px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    margin-top: 20px;
}

.contacts-container {
    max-width: 900px;
    margin: 0 auto;
}

.contacts-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    display: inline-block;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 8px 30px;
    margin-bottom: 28px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.contact-item {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--color-white);
    width: 24px;
}

.contact-item a {
    color: var(--color-white);
    border-bottom: 1px solid transparent;
}

.contact-item a:hover {
    color: #f0f0f0;
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

.social-links {
    margin: 20px 0 30px 0;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   Developer Footer
   ========================================================================== */
.dev-footer {
    text-align: center;
    margin-top: 15px;
}

.dev-footer-pill {
    font-family: var(--font-footer);
    font-size: 12px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
    color: var(--color-white);
    white-space: nowrap;
}

.heart {
    color: #ff4d4f;
    font-size: 1rem;
    animation: heartPulse 1.8s infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.dev-footer-logo {
    height: 18px;
    width: auto;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

.dev-footer-logo:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Modal / Lightbox
   ========================================================================== */
.image-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.image-modal.active .modal-image {
    transform: scale(1);
}

.modal-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 12px;
    font-family: var(--font-body);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
    z-index: 2010;
}

.modal-close:hover {
    color: var(--color-secondary);
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 16px 14px;
    border-radius: 4px;
    transition: var(--transition);
    z-index: 2010;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-secondary);
}

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

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

/* ==========================================================================
   Responsividade / Media Queries
   ========================================================================== */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.4rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --navbar-height-desktop: 80px;
    }

    .navbar {
        height: var(--navbar-height-mobile);
        padding: 8px 16px;
    }

    .logo-img {
        height: 60px;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--navbar-height-mobile);
        left: 0;
        right: 0;
        background-color: var(--color-bg-light);
        flex-direction: column;
        gap: 12px;
        padding: 20px 24px 28px 24px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.3s ease;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 1.05rem;
    }

    .hero-section {
        height: 52vh;
        min-height: 380px;
    }

    .hero-content h1 {
        font-size: 1.85rem;
    }

    .hero-divider {
        font-size: 1.4rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
        margin-bottom: 22px;
    }

    .cta-button {
        padding: 10px 22px;
        font-size: 0.95rem;
    }

    .intro-section {
        padding: 40px 18px;
    }

    .logo-letters {
        height: 65px;
        margin-bottom: 20px;
    }

    .intro-section p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .gallery-section {
        padding: 40px 18px;
    }

    .gallery-section h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .contacts-section {
        padding: 40px 16px 25px 16px;
    }

    .contact-item {
        font-size: 1rem;
    }

    .contact-item i {
        font-size: 1rem;
    }

    .modal-nav {
        font-size: 1.8rem;
        padding: 10px 8px;
    }

    .modal-nav.prev {
        left: 8px;
    }

    .modal-nav.next {
        right: 8px;
    }

    .modal-close {
        top: 14px;
        right: 16px;
        font-size: 2rem;
    }
}

/* ==========================================================================
   Botão Flutuante de WhatsApp
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    z-index: 1500;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba59;
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
    color: #ffffff;
}

.whatsapp-float:active {
    transform: scale(0.96);
}

/* Efeito de pulso suave */
.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D366;
    opacity: 0.8;
    animation: whatsappPulse 2.4s infinite;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.22);
        opacity: 0;
    }
    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

.whatsapp-tooltip {
    position: absolute;
    right: 72px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-family: var(--font-body);
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1f2937;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 30px;
        bottom: 18px;
        right: 18px;
    }

    .whatsapp-tooltip {
        display: none; /* Em telemóveis oculta o tooltip para não sobrepor conteúdo */
    }
}

/* Estilo para links de contacto interativos */
.contact-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-item .map-hint {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
    vertical-align: middle;
    transition: background 0.3s ease;
}

.contact-item a:hover .map-hint {
    background: #ffffff;
    color: var(--color-primary);
}

/* Mobile pequeno (max-width: 480px) */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content h1 {
        font-size: 1.55rem;
    }

    .hero-content h2 {
        font-size: 1.05rem;
    }

    .dev-footer-pill {
        font-size: 10.5px;
        padding: 5px 12px;
        white-space: normal;
        flex-wrap: wrap;
        justify-content: center;
    }
}

