/* Basic styles for Wiwa La Fiesta website */

:root {
    --primary-orange: #f58d25;
    --primary-red: #d43521;
    --primary-teal: #138496;
    --primary-dark-teal: #00596f;
    --light-bg: #f4f4f4;
    --white: #fff;
    --text-dark: #333;
    --slider-center-width: 900px; /* center image max width */
    --slider-height: 420px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

p {
    color: var(--primary-teal);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title {
    display: flex;
    align-items: center;
}

.logo {
    width: 100px;
    height: auto;
}

h1 {
    font-size: 2.5em;
    margin: 0 0 0 20px;
    color: var(--primary-dark-teal);
    position: relative;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--primary-teal);
    margin-top: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav li {
    border-right: 3px solid rgba(0, 0, 0, 0.2);
}

nav li {
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--primary-dark-teal);
    font-weight: bold;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

nav a:hover {
    color: var(--primary-orange);
    background-color: rgba(245, 141, 37, 0.1);
}

.slider {
    position: relative;
    width: 100%;
    overflow: visible; /* allow arrows positioned outside the image to be visible */
    margin-bottom: 40px;
}

.slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* Fixed-size slider: width and height are constant regardless of image dimensions */
.slider-track {
    position: relative;
    width: 100%;
    height: var(--slider-height);
    margin: 0 auto;
    overflow: hidden; /* hide overflow from images */
    background-color: #000; /* fallback while images load */
}

/* Center container holds the main (uncropped) image */
.slider-inner {
    width: var(--slider-center-width);
    height: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

/* Slides are img elements inside .slider-inner */
.slide {
    display: none;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 300ms ease, transform 300ms ease;
}

.slide.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* Left and right blurred side backgrounds that fill remaining width */
.slider-side {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc((100% - var(--slider-center-width))/2);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(8px) brightness(0.9) saturate(0.9);
    transform: scale(1.05);
    z-index: 10;
}

.slider-side.left { left: 0; }
.slider-side.right { right: 0; }

/* If a slide contains an img element (future structure), ensure it fills the area */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.slider-arrow.left, .slider-arrow.right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.6);
    color: var(--text-dark);
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 28px;
    z-index: 1100;
    border-radius: 50%;
}

.slider-arrow.left {
    left: 24px; /* moved closer to middle */
}

.slider-arrow.right {
    right: 24px; /* moved closer to middle */
}

.slider-arrow.left:hover, .slider-arrow.right:hover {
    color: var(--primary-teal);
}

main {
    padding: 40px 0;
}

section {
    margin-bottom: 40px;
    padding: 40px 0;
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

#about {
    background-color: rgba(245, 141, 37, 0.1); /* light orange */
}

#offer {
    background-color: rgba(211, 53, 33, 0.1); /* light red */
}

#contact {
    background-color: rgba(19, 132, 150, 0.1); /* light teal */
}

h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-dark-teal);
    position: relative;
}

h2::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--primary-orange);
    border-radius: 50%;
    margin-right: 15px;
    vertical-align: middle;
}

#about h2::before {
    background-color: var(--primary-orange);
}

#offer h2::before {
    background-color: var(--primary-red);
}

#contact h2::before {
    background-color: var(--primary-teal);
}

.offer-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(211, 53, 33, 0.2), 0 2px 10px rgba(0,0,0,0.1);
    max-width: none;
    margin: 0;
    border-left: 5px solid var(--primary-red);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1 / 1; /* make cards square */
    overflow: hidden;
}

/* Grid for offers: responsive columns */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
    margin-top: 20px;
    grid-auto-rows: 1fr; /* make each grid row stretch equally */
}

/* Actions row containing buttons -> make buttons equal size */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.card-actions .cta-button {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.cta-button {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-red));
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.cta-button:hover {
    background: linear-gradient(45deg, var(--primary-red), var(--primary-orange));
    transform: scale(1.05);
}

.cta-button {
    text-decoration: none;
}

a {
    text-decoration: none;
}

.offer-card a.cta-button {
    display: inline-block;
    margin-right: 10px;
    margin-top: 10px;
}

footer {
    background: linear-gradient(135deg, var(--primary-dark-teal), var(--primary-teal));
    color: var(--white);
    text-align: center;
    padding: 20px 0;
}

.view-more-btn {
    background-color: var(--primary-teal);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    margin-left: 10px;
}

.view-more-btn:hover {
    background-color: var(--primary-dark-teal);
    transform: scale(1.05);
}

.contact-btn {
    text-decoration: none;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content .owner-full {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto 12px auto; /* center the image */
    border-radius: 6px;
    max-height: 220px; /* limit image height so description is visible */
    object-fit: contain; /* scale without cropping */
}

/* Owner modal: place image left and text on right for larger screens */
.owner-modal .modal-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 900px;
}

.owner-modal .modal-content .owner-full {
    margin: 0;
    max-height: 320px; /* slightly larger image */
    width: auto;
}

.owner-modal .owner-info {
    display: flex;
    flex-direction: column;
}

@media (max-width: 700px) {
    .owner-modal .modal-content {
        flex-direction: column;
    }
    .owner-modal .modal-content .owner-full {
        max-height: 220px;
        margin: 0 auto 12px auto;
    }
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-dark);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

.close:hover {
    color: var(--primary-red);
}

.owners {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.owner-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.owner-photo:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .offer-card {
        padding: 15px;
    }
}

/* Responsive adjustments for tablets and mobile devices */
@media (max-width: 900px) {
    :root {
        --slider-center-width: calc(100% - 40px);
        --slider-height: 360px;
    }

    .logo {
        width: 80px;
    }

    h1 {
        font-size: 2em;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    .slider-side {
        width: calc((100% - var(--slider-center-width))/2);
    }
}

@media (max-width: 600px) {
    :root {
        --slider-center-width: calc(100% - 24px);
        --slider-height: 300px;
    }

    .container {
        padding: 0 12px;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .logo-title {
        align-items: center;
        gap: 12px;
    }

    h1 {
        font-size: 1.6em;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .cta-button {
        width: 100%;
        height: 48px;
    }

    .owner-photo {
        width: 100px;
        height: 100px;
    }

    .slider-arrow.left {
        left: 12px;
    }

    .slider-arrow.right {
        right: 12px;
    }

    .slider-arrow.left, .slider-arrow.right {
        padding: 8px 10px;
        font-size: 22px;
    }

    .modal-content {
        width: 92%;
        max-width: none;
    }
}