/* ==========================================================================
   1. Variables & Root
   ========================================================================== */
   :root {
    --font-family: 'PP Mori';
    --container-padding: 0 120px;
    --h1-font-size: 120px;
    --h1-font-weight: 600;
    --primary-color: #1a1a1a;
    --text-color: #E5E5E5;
    --bg-color: #F6F2EB;
    --border-color: #E0D7C4;
    --scroll-behavior: smooth;
    --scroll-time: 3s;
    --scroll-timing: cubic-bezier(0.645, 0.045, 0.355, 1);
    --phone-input-offset: 0.5px;
}

/* ==========================================================================
   2. Font Faces
   ========================================================================== */
@font-face {
    font-family: "PP Mori";
    src: url("fonts/PP_Mori/PPMori-Regular.woff2") format("woff2"),
         url("fonts/PP_Mori/PPMori-Regular.woff") format("woff"),
         url("fonts/PP_Mori/PPMori-Regular.ttf") format("truetype"),
         url("fonts/PP_Mori/PPMori-Regular.eot?#iefix") format("embedded-opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: "PP Mori";
    src: url("fonts/PP_Mori/PPMori-SemiBold.eot");
    src: url("fonts/PP_Mori/PPMori-SemiBold.eot?#iefix") format("embedded-opentype"),
         url("fonts/PP_Mori/PPMori-SemiBold.woff2") format("woff2"),
         url("fonts/PP_Mori/PPMori-SemiBold.woff") format("woff"),
         url("fonts/PP_Mori/PPMori-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. Base Styles
   ========================================================================== */
html {
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Safari-specific smooth scroll */
@supports (-webkit-overflow-scrolling: touch) {
    html {
        scroll-behavior: auto;
    }
    
    .smooth-scroll {
        -webkit-overflow-scrolling: touch;
        transition: all var(--scroll-time) var(--scroll-timing);
    }
}

/* Form fixes for Safari */
@supports (-webkit-touch-callout: none) {
    input,
    textarea {
        font-size: 16px !important; 
        -webkit-appearance: none;
        border-radius: 0;
    }


    .contact-form input,
    .contact-form textarea {
        -webkit-appearance: none;
        -webkit-border-radius: 0;
    }

    /* Fix for autofill background in Safari */
    input:-webkit-autofill,
    textarea:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 1000px var(--primary-color) inset !important;
        -webkit-text-fill-color: var(--text-color) !important;
    }
}

/* Safari-specific animation fixes */
@supports (-webkit-touch-callout: none) {
    .bean {
        -webkit-transform-style: preserve-3d;
        -webkit-backface-visibility: hidden;
        -webkit-perspective: 1000;
    }

    .map-marker {
        -webkit-transform: translate(-50%, -50%);
        -webkit-backface-visibility: hidden;
    }
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* For Safari and older browsers */
@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: var(--font-family), -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    margin: 0;
    overflow-x: hidden;
    font-size: 16px;
    background-color: #fff;
}

p {
    font-size: clamp(1rem, 0.956rem + 0.1408vw, 1.125rem);
}

/* ==========================================================================
   4. Layout & Container
   ========================================================================== */
.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--container-padding);
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

section {
    padding: clamp(48px, 8vw, 120px) 0;
    margin: 0;
    position: relative;
    background-color: var(--bg-color);
    overflow: visible;
}

/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */
header {
    position: relative;
    min-height: 100%;
    background-color: #fff;
}

/* Navigation */
nav {
    background-color: #e9e9e981;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px 0;
    position: relative;
    z-index: 3;
    width: 100%;
}

.logo {
    margin-top: 15px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo img {
    height: clamp(28px, 4vw, 48px);
    width: auto;
}

.nav-links {
    display: flex;
    gap: 48px;
    color: #1b1b1b;
}

.nav-links a {
    color: #1b1b1b;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

/* Hero Section */
.hero {
    box-sizing: content-box;
    text-align: center;
    padding: 0;
    margin: clamp(48px, 8vw, 120px) 0;
    font-weight: var(--h1-font-weight);
}

.title {
    font-size: clamp(48px, 7.2vw, 120px);
    line-height: 1;
    font-weight: 600;
}

.hero-image {
    margin-top: clamp(24px, 4vw, 48px);
    height: auto;
    max-width: 100%;
}

.hero-image img {
    width: clamp(280px, 60vw, 630px);
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Scroll Icon */
.scroll-icon {
    display: flex;
    justify-content: center;
    margin: clamp(48px, 8vw, 120px) 0 clamp(24px, 4vw, 48px) 0;
    height: 48px;
}

.scroll-icon-img {
    display: block;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transform-origin: center;
    transition: all 1500ms cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0);
    width: 48px;
    height: 48px;
}

.scroll-icon-img.fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    transform: rotate(180deg);
    mix-blend-mode: difference;
    filter: invert(1);
}

/* Coffee Beans */
.coffee-beans {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    contain: layout size;
}

.bean {
    position: absolute;
    transform-origin: center;
    will-change: transform;
    transform: translateZ(0);
    contain: layout paint style;
}

.blurred {
    filter: blur(3px) brightness(0.8);
    z-index: -2;
}

.blurred-extra {
    filter: blur(6px) brightness(0.65);
    z-index: -2;
}

/* Bean Positions */
.bean1-0 {
    bottom: 7%;
    left: 35%;
    width: clamp(40px, 4vw, 80px);
    --rotation: -15deg;
    --float-x: 25px;
    --float-y: 20px;
    --rotate-add: 8deg;
    animation-duration: 12s;
}

.bean1-1 {
    top: 8%;
    left: 62%;
    width: clamp(30px, 3vw, 58px);
    --rotation: -20deg;
    --float-x: 30px;
    --float-y: 25px;
    --rotate-add: 10deg;
    animation-duration: 14s;
}

.bean2-0 {
    top: 18%;
    left: -3%;
    width: clamp(60px, 6vw, 120px);
    --rotation: 25deg;
    --float-x: 35px;
    --float-y: 22px;
    --rotate-add: 12deg;
    animation-duration: 13s;
}

.bean2-1 {
    top: 35%;
    right: 10%;
    width: clamp(40px, 4vw, 80px);
    --rotation: 20deg;
    --float-x: 28px;
    --float-y: 26px;
    --rotate-add: 9deg;
    animation-duration: 15s;
}

.bean3-0 {
    top: 75%;
    right: -3%;
    width: clamp(75px, 7.5vw, 150px);
    --rotation: -35deg;
    --float-x: 32px;
    --float-y: 25px;
    --rotate-add: 10deg;
    animation-duration: 14.5s;
}

.bean3-1 {
    top: 16%;
    left: 36%;
    width: clamp(50px, 5vw, 100px);
    --rotation: -30deg;
    --float-x: 27px;
    --float-y: 23px;
    --rotate-add: 8deg;
    animation-duration: 13.5s;
}

.bean4-0 {
    top: 10%;
    left: 35%;
    width: clamp(40px, 4vw, 80px);
    --rotation: 15deg;
    --float-x: 30px;
    --float-y: 28px;
    --rotate-add: 15deg;
    animation-duration: 15.5s;
}

.bean4-1 {
    top: 51%;
    left: 33%;
    width: clamp(40px, 4vw, 80px);
    --rotation: 25deg;
    --float-x: 33px;
    --float-y: 24px;
    --rotate-add: 11deg;
    animation-duration: 14.2s;
}

.bean4-2 {
    top: 80%;
    right: 35%;
    width: clamp(40px, 4vw, 80px);
    --rotation: 20deg;
    --float-x: 29px;
    --float-y: 27px;
    --rotate-add: 13deg;
    animation-duration: 13.8s;
}

.bean4-3 {
    top: -3%;
    left: 34%;
    width: clamp(55px, 5.5vw, 110px);
    --rotation: 30deg;
    --float-x: 31px;
    --float-y: 25px;
    --rotate-add: 10deg;
    animation-duration: 15.2s;
}

.bean5-0 {
    bottom: 45%;
    left: 12%;
    width: clamp(40px, 4vw, 80px);
    --rotation: -20deg;
    --float-x: 28px;
    --float-y: 30px;
    --rotate-add: 5deg;
    animation-duration: 14.8s;
}

.bean5-1 {
    bottom: 18%;
    left: -5%;
    width: clamp(90px, 9vw, 180px);
    --rotation: -25deg;
    --float-x: 32px;
    --float-y: 28px;
    --rotate-add: 7deg;
    animation-duration: 13.2s;
}

.bean6-0 {
    top: 48%;
    right: 16%;
    width: clamp(40px, 4vw, 80px);
    --rotation: 25deg;
    --float-x: 35px;
    --float-y: 22px;
    --rotate-add: 12deg;
    animation-duration: 14.4s;
}

.bean7-0 {
    bottom: 5%;
    right: 40%;
    width: clamp(40px, 4vw, 80px);
    --rotation: -20deg;
    --float-x: 30px;
    --float-y: 25px;
    --rotate-add: 8deg;
    animation-duration: 13.7s;
}

/* ==========================================================================
   6. Section Styles - Second Section
   ========================================================================== */
.second-section {
    padding: clamp(48px, 8vw, 120px) 0;
    background-color: var(--bg-color);
}

.section-block {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    overflow: visible;
}

.section-block p {
    font-size: 18px;
    line-height: 1.5;
}

.section-block img {
    position: absolute;
    left: 75%;
    transform: translate(-50%, -50%);
    top: 50%;
    max-height: none;
    height: auto;
    overflow: visible;
}


/* Gallery */
.gallery {
    margin: clamp(32px, 5vw, 56px) 0 clamp(48px, 6vw, 80px) 0;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(var(--gallery-columns, 4), 1fr);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.gallery-item {
    display: grid;
    gap: 24px;
    width: 100%;
    height: 100%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px;
    order: var(--image-order, 0);
    margin-top: 0;
    object-fit: cover;
}


/* ==========================================================================
   7. Section Styles - Third Section
   ========================================================================== */
.third-section {
    background-color: var(--bg-color);
}

/* Text Block */
.text-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.text-block__left {
    display: flex;
    gap: 24px;
}

.text-block__right {
    font-size: 18px;
    line-height: 1.5;
}

.text-block__right p {
    margin-bottom: 24px;
}

.text-block__right p:last-child {
    margin-bottom: 0;
}

/* Swiper Styles */
.swiper {
    width: 100vw;
    margin: clamp(48px, 6vw, 80px) 0;
    overflow: visible;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.swiper-slide {
    aspect-ratio: 3/4;
    height: auto;
    width: 45%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Custom Arrows */
.swiper-button-next,
.swiper-button-prev {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    color: #000;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

@media (max-width: 768px) {
    .swiper {
        width: 100vw;
        margin-left: 0;
        transform: none;
        left: 0;
    }

    .swiper-wrapper {
        padding-left: 24px;
    }

    .swiper-slide {
        width: 75%;
    }
}

/* ==========================================================================
   8. Section Styles - Fourth Section
   ========================================================================== */
.fourth-section {
    background-color: #E0D7C4;
}

.story-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
        "title text"
        "gallery gallery";
    gap: 24px;
    position: relative;
}

.story-block .title {
    grid-area: title;
}

.story-text {
    grid-area: text;
    margin-bottom: 56px;
}

.story-gallery {
    grid-area: gallery;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.story-gallery-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.story-gallery picture {
    width: 100%;
    height: 100%;
}

.story-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

    @media (max-width: 768px) {
        .story-block {
            display: flex;
            flex-direction: column;
            gap: 36px;
            position: relative;
            z-index: 0;
            overflow: hidden;
        }
    
        .story-gallery {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            order: 2;
            position: relative;
            z-index: 1;
        }
    
        .story-gallery > picture {
            grid-column: 1 / -1;
            order: -1;
            position: relative;
            z-index: 1;
            display: block;
        }
    
        .story-gallery-left {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            position: relative;
            z-index: 1;
        }
    
        .story-text {
            position: relative;
            z-index: 2;
            background-color: #E0D7C4;
            margin: 0;
            padding: 0;
            order: 3;
        }
    
        .story-gallery img,
        .story-gallery picture {
            position: relative;
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }


    @supports (-webkit-overflow-scrolling: touch) {
        @media (max-width: 768px) {
            .story-block {
                transform: none !important;
                -webkit-transform: none !important;
            }

            .story-gallery,
            .story-gallery picture,
            .story-gallery img,
            .story-text {
                transform: none !important;
                -webkit-transform: none !important;
                backface-visibility: visible !important;
                -webkit-backface-visibility: visible !important;
            }
        }
    }

.story-cup {
    position: absolute;
    left: 30px;
    top: 130px;
    width: clamp(180px, 40vw, 320px);
    height: auto;
    z-index: 1;
}

.story-text p {
    font-size: clamp(1rem, 0.956rem + 0.1408vw, 1.125rem);
    line-height: 1.5;
    margin-bottom: 24px;
}

.story-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   9. Section Styles - Map Section
   ========================================================================== */
.map-section {
    background-color: #1B1B1B;
    padding: 0;
    color: #fff;
    overflow: hidden;
    position: relative;
    margin-top: -1px;
}

.map-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    height: 960px;
    width: 100vw;
    margin-bottom: -1px;
    margin-left: calc(-1 * var(--container-padding, 120px));
    margin-right: calc(-1 * var(--container-padding, 120px));
}

.map-wrapper {
    position: relative;
    width: 75vw;
    height: 960px;
    overflow: hidden;
    --marker-x: 40.5%;
    --marker-y: 49%;
}

.map-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(27, 27, 27, 0) 0%,
        rgba(27, 27, 27, 0.8) 100%
    );
    pointer-events: none;
}
.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.7);
}

.map-marker {
    position: absolute;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    z-index: 2;
    background-image: url('/images/5-section/pin.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
    cursor: pointer;
    animation: markerBounce 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.map-content {
    position: absolute;
    left: 0;
    bottom: 120px;
    width: 720px;
    z-index: 2;
    margin-left: var(--container-padding, 120px);
}

.map-content h2 {
    color: #E0D7C4;
    font-size: clamp(28px, 7.2vw, 64px);
    line-height: 1.2;
    margin-bottom: 0;
    font-weight: 500;
    letter-spacing: -0.02em;
}


/* ==========================================================================
   10. Section Styles - Contact Section
   ========================================================================== */
.contact-section {
    background-color: #1B1B1B;
    color: var(--text-color);
    padding: clamp(48px, 8vw, 120px) 0;
    margin-top: -1px;
}

.contact-section .title {
    color: #E0D7C4;
    margin-bottom: clamp(48px, 8vw, 120px);
    font-size: clamp(48px, 7.2vw, 64px);
    line-height: 1.2;
    text-align: left;
}

/* Contact Form */
.contact-form {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 850px) {
    .contact-form {
        max-width: min(720px, 65%);
        margin: 0;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}


.contact-form input,
.contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(224, 215, 196, 0.2);
    padding: 0 0 8px 0;
    color: #E0D7C4;
    font-family: var(--font-family);
    font-size: 18px;
    outline: none;
    transition: border-color 0.3s ease;
    line-height: normal;
    margin: 0;
}


.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(224, 215, 196, 0.6); 
}


.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
    color: rgba(224, 215, 196, 0.8); 
}


.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(224, 215, 196, 0.6);
    transition: color 0.3s ease;
    line-height: normal;
    padding: 0;
    font-size: 18px;
}


.send-button {
    background: transparent;
    border: 1px solid rgba(224, 215, 196, 0.2);
    color: #E0D7C4;
    padding: 16px 32px;
    font-family: var(--font-family);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: inline-block;
    margin: 0;
}

.send-button:hover {
    background: rgba(224, 215, 196, 0.1);
    border-color: rgba(224, 215, 196, 0.3);
}

.iti__selected-dial-code {
    color: #E0D7C4;
    line-height: 24px;
    margin-left: 4px;
}

@media (max-width: 768px) {
    .contact-form {
        max-width: 100%;
        margin: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .send-button {
        width: 100%;
    }
}

@media (min-width: 850px) and (max-width: 1000px) {
    .form-row {
        grid-template-columns: 0.9fr 0.9fr 1.2fr;
        gap: 24px;
    }
    
    .contact-form input[type="tel"] {
        padding-left: 60px !important;
    }
}

/* Typing Animation */
.typing-title {
    position: relative;
    font-size: clamp(48px, 7vw, 120px)!important;
    max-width: 840px;
    margin-bottom: clamp(36px, 7vw, 120px)!important;
    overflow: visible; 
}

.break {
    display: inline; 
  }

@media (max-width: 425px) {
    .break {
        display: none; 
    }
}


.contact-form {
    position: relative;
    z-index: 1; 
}


/* ==========================================================================
   11. Footer Styles
   ========================================================================== */
.footer {
    background-color: #1B1B1B;
    padding: 24px 0;
    color: #E0D7C4;
    border-top: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.address, 
.email {
    display: flex;
    align-items: center;
    gap: 8px;
}

.address img, 
.email img {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

.footer a {
    color: #E0D7C4;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.6;
}


/* ==========================================================================
   12. Animations
   ========================================================================== */
@-webkit-keyframes floatBean {
    0% {
        -webkit-transform: translate(0, 0) rotate(var(--rotation));
        transform: translate(0, 0) rotate(var(--rotation));
    }
    50% {
        -webkit-transform: translate(var(--float-x, 15px), var(--float-y, 15px)) rotate(calc(var(--rotation) + var(--rotate-add, 10deg)));
        transform: translate(var(--float-x, 15px), var(--float-y, 15px)) rotate(calc(var(--rotation) + var(--rotate-add, 10deg)));
    }
    100% {
        -webkit-transform: translate(0, 0) rotate(var(--rotation));
        transform: translate(0, 0) rotate(var(--rotation));
    }
}

@keyframes floatBean {
    0% {
        transform: translate(0, 0) rotate(var(--rotation));
    }
    50% {
        transform: translate(var(--float-x, 15px), var(--float-y, 15px)) rotate(calc(var(--rotation) + var(--rotate-add, 10deg)));
    }
    100% {
        transform: translate(0, 0) rotate(var(--rotation));
    }
}


.bean {
    --rotation: 0deg;
    animation: floatBean 8s ease-in-out infinite;
}
        
.bean1-0, .bean1-1 { --rotation: -15deg; --float-x: 12px; --float-y: 18px; --rotate-add: 8deg; }
.bean2-0, .bean2-1 { --rotation: 25deg; --float-x: 18px; --float-y: 12px; --rotate-add: 12deg; }
.bean3-0, .bean3-1 { --rotation: -35deg; --float-x: 15px; --float-y: 15px; --rotate-add: 10deg; }
.bean4-0, .bean4-1, .bean4-2, .bean4-3 { --rotation: 15deg; --float-x: 20px; --float-y: 10px; --rotate-add: 15deg; }
.bean5-0, .bean5-1 { --rotation: -20deg; --float-x: 10px; --float-y: 20px; --rotate-add: 5deg; }
.bean6-0 { --rotation: 25deg; --float-x: 15px; --float-y: 12px; --rotate-add: 12deg; }
.bean7-0 { --rotation: -20deg; --float-x: 12px; --float-y: 15px; --rotate-add: 8deg; }


.bean {
    --float-x: 15px;
    --float-y: 15px;
}

@keyframes markerBounce {
    0% { transform: translate(-50%, -50%) scale(1); }
    20% { transform: translate(-50%, -60%) scale(1.08); }
    40% { transform: translate(-50%, -50%) scale(0.98); }
    60% { transform: translate(-50%, -52%) scale(1.03); }
    80% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   13. Media Queries
   ========================================================================== */

/* Large Screens (1400px and below) */
@media (max-width: 1400px) {
    .section-block img {
        left: 75%;
        transform: translate(-50%, -50%);
    }
}

/* Medium Screens (1050px and below) */
@media (max-width: 1050px) {
    .container {
        padding: 0 60px;
    }
    
    .nav-links {
        display: none;
    }

    section,
    .second-section,
    .third-section,
    header,
    body,
    nav {
        background-color: #F6F2EB;
    }

    .fourth-section {
        background-color: #E0D7C4;
    }
}

/* Tablets and Mobile (768px and below) */
@media (max-width: 768px) {
    /* Layout */
    .container { padding: 0 24px; }
    section { padding: 48px 0; }
    
    /* Typography */
    .title { font-size: 48px; }
    p { font-size: 16px; }
    
    /* Navigation */
    .navigation {
        padding: 24px 0;
        justify-content: center;
    }

    .logo {
        margin-top: 0;
        position: static;
        left: auto;
        transform: none;
        display: flex;
        justify-content: center;
    }

    .logo img {
        height: clamp(28px, 4vw, 48px);
        width: auto;
    }

    /* Hero Section */
    .hero-image { margin-top: 24px; }
    .hero-image img { width: clamp(280px, 80vw, 630px); }

    /* Gallery */
    .gallery {
        --gallery-columns: 3;
        gap: 16px;
    }

    .gallery-item {
        gap: 16px;
    }
    
    .gallery-item:nth-child(4) {
        display: none;
    }

    /* Section Block */
    .section-block {
        display: block;
    }

    .section-block img {
        position: static;
        transform: none;
        width: clamp(180px, 40vw, 400px);
        margin-top: 24px;
        margin-left: auto;
        margin-right: 24px;
        display: block;
    }

    /* Text Block */
    .text-block {
        display: block;
    }

    .text-block__left {
        justify-content: space-between;
        margin: 36px 0;
    }

    .text-block__right p {
        margin-bottom: 36px;
    }

    .text-block__right p:last-child {
        margin-bottom: 0;
    }

    /* Swiper Navigation */
    .swiper-button__right,
    .swiper-button__left {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .swiper-button__right a,
    .swiper-button__left a {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    } 

    .swiper-button__right {
        margin-left: auto;
    }

    /* Map Section */
    .map-container {
        flex-direction: column;
        height: auto;
        width: 100vw;
        margin-left: -24px;
        margin-right: -24px;
    }

    .map-wrapper {
        width: 100%;
        height: 500px;
        order: 1;
    }

    .map-content {
        position: relative;
        width: calc(100% - 48px);
        bottom: 0;
        order: 2;
        margin: 0 24px 48px 24px;
    }

    .map-content h2 {
        font-size: 28px;
        margin-bottom: 16px;
        width: 100%;
    }

    .map-content p {
        width: 100%;
        font-size: 16px;
        max-width: none;
    }

    /* Contact Form */
    .contact-form {
        max-width: 100%;
        margin: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .send-button {
        width: 100%;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    /* Animations */
    .bean {
        display: none;
        animation: none !important;
        will-change: auto;
    }

    .bean1-0,
    .bean2-0,
    .bean3-0 {
        display: block;
        transform: none !important;
    }

    .story-cup {
        display: none;
    }

    .map-marker {
        animation: markerBounceSimple 1.5s ease-in-out infinite;
    }
}

/* Mobile Devices (470px and below) */
@media (max-width: 470px) {
    .gallery {
        --gallery-columns: 2;
        gap: 8px;
    }
    
    .gallery-item {
        gap: 8px;
    }
    
    .gallery-item:nth-child(4) {
        display: grid;
        height: 100%;
    }
}

/* Small Mobile Devices (375px and below) */
@media (max-width: 375px) {
    .container {
        padding: 0 16px;
    }

    .map-content {
        width: calc(100% - 32px);
        margin: 0 16px 48px 16px;
    }
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    draggable: false;
}

* {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    draggable: false;
}

a, button, input, textarea, .swiper, .swiper-slide, .map-marker, .scroll-icon-img {
    pointer-events: auto;
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}


p, h1, h2, h3, h4, h5, h6 , span {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    pointer-events: auto;
}


.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form input:-webkit-autofill:active,
.contact-form textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px var(--primary-color) inset !important;
    -webkit-text-fill-color: #E0D7C4 !important;
    caret-color: #E0D7C4 !important;
}

.message-field {
    margin-bottom: 48px;
    position: relative;
}

.message-field textarea {
    width: 100%;
    height: 24px;
    min-height: 24px;
    padding: 0;
    margin: 0;
    border: none;
    border-bottom: 1px solid rgba(224, 215, 196, 0.2);
    background: transparent;
    color: #E0D7C4;
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 24px;
    outline: none;
    resize: none;
    overflow: hidden;
    display: block;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    position: relative;
}

.message-field::after {
    content: '';
    display: block;
    height: 8px;
}

.message-field textarea::placeholder {
    line-height: 24px;
    padding: 0;
}


.iti {
    width: 100%;
    position: relative;
}

.iti__flag-container {
    display: none !important; 
}

.iti__selected-flag {
    display: none !important; 
}

.contact-form input[type="tel"] {
    width: 100%;
    padding-left: 0 !important; 
    padding-bottom: 8px;
    line-height: 24px;
}


.iti__selected-dial-code {
    display: none !important;
}

.swiper-button__right,
.swiper-button__left {
    width: 40px; 
    height: 40px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.swiper-button__right a,
.swiper-button__left a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    position: relative; 
}


.swiper-button__right a::before,
.swiper-button__left a::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
}

.swiper-button__right img,
.swiper-button__left img {
    width: 40px; 
    height: 40px; 
    pointer-events: none;
}


.swiper-button__right a:hover,
.swiper-button__left a:hover {
    opacity: 0.8;
}


.swiper-button__right a:active,
.swiper-button__left a:active {
    opacity: 0.6;
}


