/* ========================================
   Micolina Italian Kitchen — Styles
   ======================================== */

/* --- Variables --- */
:root {
    --color-beige: #F5F0EB;
    --color-beige-dark: #E8E0D8;
    --color-red: #920C0C;
    --color-red-hover: #B01010;
    --color-text: #2D2D2D;
    --color-text-muted: #7A7067;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --font-body: 'Assistant', 'Segoe UI', Tahoma, sans-serif;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --sidebar-width: 280px;
    --header-height: 64px;
    --transition: 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-beige);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background: var(--color-beige);
    border-bottom: 1px solid var(--color-beige-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
}

.header-logo {
    height: 80px;
    width: auto;
    border-radius: 4px;
}

/* --- Hamburger Button --- */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    z-index: 200;
}

.hamburger-btn span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--color-red);
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

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

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    right: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-white);
    border-left: 2px solid var(--color-red);
    transition: right var(--transition);
    z-index: 150;
    padding-top: calc(var(--header-height) + 1.5rem);
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition);
    z-index: 140;
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
    list-style: none;
    padding: 0 1.5rem;
}

.sidebar-nav li {
    border-bottom: 1px solid var(--color-beige-dark);
}

.sidebar-nav>li>a,
.sidebar-nav>li>button {
    display: block;
    width: 100%;
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    transition: color var(--transition);
}

.sidebar-nav>li>a:hover,
.sidebar-nav>li>button:hover {
    color: var(--color-red);
}

.sidebar-nav>li>a.active-link {
    color: var(--color-red);
}

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

.submenu-toggle .arrow {
    font-size: 0.7rem;
    transition: transform var(--transition);
}

.submenu-toggle.active .arrow {
    transform: rotate(90deg);
}

/* --- Submenu --- */
.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-right: 1rem;
}

.submenu.open {
    max-height: 200px;
}

.submenu li {
    border-bottom: none;
}

.submenu a {
    display: block;
    padding: 0.6rem 0;
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.submenu a:hover {
    color: var(--color-red);
}

/* --- Main Content --- */
main {
    padding-top: var(--header-height);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    filter: blur(3.5px);
    transform: scale(1.05);
    z-index: 0;
}

.hero-logo {
    position: relative;
    max-width: 380px;
    width: 75%;
    z-index: 1;
}

/* --- About Section --- */
.about-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.accordion-toggle {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid var(--color-red);
    color: var(--color-text);
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition);
}

.accordion-toggle:hover .accordion-title {
    color: var(--color-red-hover);
}

.accordion-title {
    color: var(--color-red);
    letter-spacing: 0.5px;
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--color-red);
    transition: transform var(--transition);
}

.accordion-toggle.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.accordion-inner {
    padding: 2rem 0;
    line-height: 2;
    color: var(--color-text);
    font-size: 1.05rem;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--color-red);
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition);
}

.read-more-btn:hover {
    color: var(--color-red-hover);
}

.read-more-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.read-more-content p {
    margin-bottom: 1rem;
}

/* --- Gallery Carousel --- */
.carousel-section {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-track-wrapper {
    overflow: hidden;
    flex: 1;
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease;
}

.carousel-img {
    width: calc(25% - 0.75rem);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.carousel-img:hover {
    transform: scale(1.03);
}

.carousel-btn {
    background: none;
    border: 2px solid var(--color-red);
    color: var(--color-red);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.carousel-btn:hover {
    background: var(--color-red);
    color: var(--color-white);
}

/* --- Page Header (Workshop pages) --- */
.page-header {
    text-align: center;
    padding: 3.5rem 1.5rem 1.5rem;
}

.page-header h1 {
    font-family: var(--font-body);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--color-red);
    position: relative;
    display: inline-block;
    letter-spacing: 0.03em;
    animation: fadeIn 0.8s ease-out both;
}

.page-header h1::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--color-red);
    margin: 0.8rem auto 0;
    animation: expandLine 0.6s ease-out 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 80px; }
}

/* --- Page Content --- */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    line-height: 1.9;
}

.page-content ul {
    list-style: none;
    padding-right: 0;
    margin: 0.5rem 0;
}

.page-content ul li::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M15 65 C20 40, 35 20, 50 15 C65 20, 80 40, 85 65 Z' fill='none' stroke='%23333' stroke-width='3'/%3E%3Cpath d='M25 60 C30 42, 40 28, 50 23 C60 28, 70 42, 75 60' fill='none' stroke='%23333' stroke-width='2.5'/%3E%3Cpath d='M35 55 C38 44, 44 34, 50 30 C56 34, 62 44, 65 55' fill='none' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M50 15 L50 65' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M12 65 C12 65, 30 80, 50 82 C70 80, 88 65, 88 65 L85 65 C85 65, 70 77, 50 78 C30 77, 15 65, 15 65 Z' fill='%23333'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* --- Workshop Cards --- */
.workshop-cards {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
}

.workshop-card {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-white);
    transition: box-shadow var(--transition);
}

.workshop-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.workshop-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

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

.workshop-card-body {
    padding: 1.2rem 1.5rem 1.5rem;
}

.workshop-card-title {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.workshop-read-more {
    font-size: 1rem;
}

.workshop-card .read-more-content p {
    margin-top: 1rem;
    line-height: 1.8;
}

.workshop-card .read-more-content h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-red);
    margin-top: 1.2rem;
    margin-bottom: 0.3rem;
}

.workshop-card .read-more-content ul {
    list-style: none;
    padding-right: 0;
    margin-top: 0.5rem;
    line-height: 1.8;
}

.workshop-card .read-more-content ul li::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M15 65 C20 40, 35 20, 50 15 C65 20, 80 40, 85 65 Z' fill='none' stroke='%23333' stroke-width='3'/%3E%3Cpath d='M25 60 C30 42, 40 28, 50 23 C60 28, 70 42, 75 60' fill='none' stroke='%23333' stroke-width='2.5'/%3E%3Cpath d='M35 55 C38 44, 44 34, 50 30 C56 34, 62 44, 65 55' fill='none' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M50 15 L50 65' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M12 65 C12 65, 30 80, 50 82 C70 80, 88 65, 88 65 L85 65 C85 65, 70 77, 50 78 C30 77, 15 65, 15 65 Z' fill='%23333'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-white);
    border-top: 2px solid var(--color-red);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

.footer-contact {
    margin-bottom: 1.5rem;
}

.footer-contact p {
    margin-bottom: 0.3rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1rem;
}

.footer-social a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.footer-social a:hover {
    color: var(--color-red);
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: var(--color-red);
    margin: 1.2rem auto;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--color-beige-dark);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        min-height: 40vh;
        padding: 2rem 1rem;
    }

    .hero-logo {
        max-width: 280px;
    }

    .accordion-toggle {
        font-size: 1.3rem;
        padding: 1rem 1.2rem;
    }

    .carousel-img {
        width: calc(50% - 0.5rem);
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .workshop-cards {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 240px;
    }

    .hero-logo {
        max-width: 220px;
    }

    .header-logo {
        height: 36px;
    }
}