/*
Theme Name: Theme Restaurante O Ferreiro
Theme URI: https://agilstore.pt
Author: Agilstore
Author URI: https://agilstore.pt
Description: Tema exclusivo para Restaurante O Ferreiro - Estilo sofisticado.
Version: 1.0
Text Domain: theme
*/

/* =========================================
   1. TOKENS (Variables)
   ========================================= */
:root {
    /* Colors - Light Sophisticated Theme (Castanho/Brown) */
    --color-bg-primary: #FDFBF7;
    --color-bg-secondary: #F4EFE6;
    --color-bg-tertiary: #E6DCCA;

    --color-accent: #8B5A2B;
    --color-accent-hover: #6A421E;

    --color-text-primary: #3E3228;
    --color-text-secondary: #6D584C;
    --color-text-muted: #9E8C81;
    --color-text-inverse: #FFFFFF;

    --color-border: rgba(139, 90, 43, 0.15);
    --color-overlay: rgba(62, 50, 40, 0.4);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */
    --text-6xl: 3.75rem;
    /* 60px */

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max-width: 1280px;
    --header-height: 80px;

    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-pill: 50px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(139, 90, 43, 0.2);
}

/* =========================================
   2. BASE STYLES (Reset & Typography)
   ========================================= */
/* Modern Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
    color: var(--color-accent);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

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

a:hover {
    color: var(--color-accent);
}

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

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--color-text-muted);
    border-radius: var(--border-radius-md);
    background-color: var(--color-bg-primary);
    transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* Utilities */
.container {
    max-width: var(--container-max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-accent {
    color: var(--color-accent);
}

.text-center {
    text-align: center;
}

.bg-secondary {
    background-color: var(--color-bg-secondary);
}

.section-padding {
    padding: var(--space-4xl) 0;
}

/* =========================================
   3. LAYOUT & COMPONENTS
   ========================================= */
/* --- Buttons --- */
.ui-btn {
    display: inline-block;
    padding: 16px 48px;
    /* Wider and taller */
    background-color: transparent;
    border: 2px solid var(--color-accent);
    /* Slightly thicker border */
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    border-radius: var(--border-radius-pill);
    /* Modern rounded look */
}

.ui-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.ui-btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
}

.ui-btn-primary:hover {
    background-color: var(--color-accent-hover);
}

.ui-btn-outline-white {
    border-color: #ffffff;
    color: #ffffff;
}

.ui-btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--color-text-primary);
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* --- Navigation --- */
.site-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* This ensures Logo Left, Nav Right */
    /* Padding moved to inner container */
    padding: 0;
    background-color: rgba(30, 30, 36, 0.3);
    /* More transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-branding a {
    display: block;
}

.site-logo {
    max-height: 60px;
    /* Fits within 80px header */
    width: auto;
    transition: var(--transition-normal);
}

.site-logo:hover {
    filter: brightness(1.1);
}

.main-navigation ul {
    display: flex;
    gap: var(--space-xl);
}

.main-navigation a {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-inverse);
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
    color: var(--color-accent);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* text-align: center; Removed to allow left alignment in hero-content */
    background-size: cover;
    background-position: center;
    position: relative;
    /* margin-top removed for fixed header overlay */
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(30, 30, 36, 0.7),
            rgba(30, 30, 36, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* max-width: 800px; removed to use container width or let content flow */
    padding: var(--space-lg);
    width: 100%;
    /* Ensure it fills container */
}

.hero-subtitle {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text-inverse);
    /* White for better contrast on image */
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Added text shadow for readability */
}

.hero-title {
    font-size: var(--text-6xl);
    color: var(--color-text-inverse);
    /* White for better contrast */
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- Cards / Menu Grid --- */


.menu-item-card {
    background-color: var(--color-bg-secondary);
    padding: var(--space-xl);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-normal), transform var(--transition-normal);
    height: 100%;
    /* For uniform height in slider */
}

/* --- Features Section (Zig Zag) --- */
.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4xl);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.feature-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

.feature-text {
    padding: var(--space-lg);
}

.feature-text h3 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

.feature-text p {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/* Responsive */
@media (max-width: 900px) {
    .feature-row {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .feature-row.reverse {
        display: flex;
        flex-direction: column-reverse;
        /* Ensure image keeps logical order if desired, or simpler stacking */
    }
}

/* --- Slider Customization --- */
.swiper {
    width: 100%;
    padding-bottom: 60px;
    /* More space for pagination */
    overflow: hidden;
    /* Changed from visible to hidden as requested */
    /* Allow shadows/scaling to show if needed */
}

.swiper-slide {
    height: auto;
    /* User wants "full width" images with rounded corners */
}

.swiper-slide .dish-image {
    width: 100%;
    height: 500px !important;
    /* Taller images */
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin: 0 !important;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

/* Pagination Dots */
.swiper-pagination {
    bottom: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.swiper-pagination-bullet {
    background: var(--color-text-secondary);
    opacity: 0.4;
    width: 10px;
    height: 10px;
    transition: all var(--transition-normal);
}

.swiper-pagination-bullet-active {
    background: var(--color-accent);
    opacity: 1;
    width: 14px;
    /* Larger active dot */
    height: 14px;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--color-accent);
    display: none;
}

@media (min-width: 1024px) {

    .swiper-button-next,
    .swiper-button-prev {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 50px;
        background-color: var(--color-bg-primary);
        border: 1px solid var(--color-border);
        border-radius: 50%;
        box-shadow: var(--shadow-md);
        transition: all var(--transition-normal);
        top: 250px;
        /* Center of 500px image */
        margin-top: 0;
        transform: translateY(-50%);
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 1.2rem;
        font-weight: bold;
    }

    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background-color: var(--color-accent);
        color: var(--color-bg-primary);
        border-color: var(--color-accent);
    }
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-image img {
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

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

/* --- Contact Section --- */
.contact-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    width: 100%;
}



.contact-grid {
    display: flex;
    flex-direction: row;
    gap: var(--space-2xl);
    /* Inner gap */
    background-color: var(--color-bg-primary);
    padding: var(--space-xl);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    align-items: start;
    width: 100%;
}

@media (max-width: 900px) {
    .contact-grid {
        flex-direction: column;
        gap: var(--space-xl);
    }
}

/* Inner columns inside the unified card */
.contact-grid>div {
    flex: 1;
    width: 100%;
    /* Reset child card styles if any */
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.hours-card,
.contact-form-card {
    /* These classes exist in HTML but we want to strip their specific card styles when inside the grid
       Actually, stripping above using > div is safer. 
       But let's ensure we don't have conflicting rules from previous blocks.
       I will remove the specific rule block for .hours-card, .contact-form-card below.
    */
    height: 100%;
}

.contact-phone {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    color: var(--color-text-muted);
    font-size: var(--text-lg);
    text-align: left;
    padding: var(--space-md);
    border: 4px solid var(--color-border);
    border-radius: 1000px;
}

.contact-phone .iconify {
    color: var(--color-accent);
}



.simple-form .form-group {
    margin-bottom: var(--space-md);
}

.simple-form input,
.simple-form textarea {
    width: 100%;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 12px;
    border-radius: var(--border-radius-md);
}

.simple-form input:focus,
.simple-form textarea:focus {
    border-color: var(--color-accent);
    outline: none;
}

.map-container-full {
    width: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    height: 450px;
}

.map-container-full iframe {
    width: 100%;
    height: 100%;
    display: block;
}



.hours-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

.hours-item:last-child {
    border-bottom: none;
}

.hours-item .day {
    color: var(--color-accent);
    font-weight: 700;
}

.hours-item .time {
    color: var(--color-text-primary);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-bg-tertiary);
    padding: var(--space-4xl) 0 var(--space-2xl);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    text-align: center;
}

.footer-credits {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer-credits a {
    color: var(--color-accent);
}

.footer-logos-bar {
    max-width: 40%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: brightness(0);
    mix-blend-mode: overlay;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-icons a {
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 1px;
}

.social-icons a:hover {
    color: var(--color-accent);
}

/* --- Full Screen Sections --- */
#sobre,
#features,
#galeria,
#horarios {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}