@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital@1&display=swap');

/* Custom Font Import */
@font-face {
    font-family: 'Aston Script';
    src: url('fonts/AstonScript.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #fff5f5;
    width: 100%;
    min-height: 100%;
    position: relative;
    overscroll-behavior: contain;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    line-height: 1.6;
    color: #4a4a4a;
    letter-spacing: 0.3px;
}

.card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 500px;
    text-align: center;
  }

  .card h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  .card p {
    font-size: 1em;
    margin: 10px 0;
  }

  .image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .full-image {
    width: 100%;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
    object-position: center;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  .btn-lokasi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(128, 0, 0, 0.9) !important;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    width: fit-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap;
    min-width: 180px;
    max-width: 90%;
  }

  .btn-lokasi:hover {
    background: rgba(128, 0, 0, 1) !important;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  }

  .btn-lokasi svg {
    vertical-align: middle;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

.container {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
    margin: 40px 0;
    padding: 20px;
    transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-align: center;
}

/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #fff5f5;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.overlay-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.overlay-text {
    position: relative;
    text-align: center;
    color: white;
    z-index: 2;
    padding: 30px;
    animation: fadeIn 1.5s ease-out;
}

.overlay-text h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    letter-spacing: 1px;
    color: white;
}

.overlay-text h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    letter-spacing: 1px;
    color: white;
}

.btn-primary {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    text-transform: none;
    letter-spacing: 1px;
    padding: 15px 40px;
    border: 2px solid white;
    background: rgba(128, 0, 0, 0.9);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background-color: white;
    color: #800000;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Styles for Overlay */
@media screen and (max-width: 768px) {
    .overlay-text h1 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }

    .overlay-text h2 {
        font-size: 1.8rem;
        margin-bottom: 1.2rem;
    }

    .btn-primary {
        font-size: 1.1rem;
        padding: 12px 30px;
    }

    .section h1 {
        font-size: 2rem;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .section p {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 480px) {
    .overlay-text {
        padding: 20px;
    }

    .overlay-text h1 {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
    }

    .overlay-text h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .btn-primary {
        font-size: 1rem;
        padding: 10px 25px;
        letter-spacing: 2px;
    }

    .section h1 {
        font-size: 1.6rem;
    }

    .section h2 {
        font-size: 1.4rem;
    }

    .section p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .section {
        scroll-snap-align: center;
        margin: 15px 0;
        transition: transform 0.3s ease-out;
    }

    .full-image {
        width: 100%;
        height: auto;
        max-height: 95vh;
        object-fit: contain;
        margin: 10px 0;
    }
}

@media screen and (max-width: 480px) {
    .section {
        min-height: 100vh;
        margin: 15px 0;
        padding: 5px;
    }

    .full-image {
        width: 100%;
        height: auto;
        max-height: 92vh;
        object-fit: contain;
        margin: 8px 0;
    }
}

/* Portrait Mobile Styles */
@media screen and (max-width: 480px) {
    .container {
        padding: 5px 0;
    }

    .section {
        margin: 0;
        padding: 0;
    }

    .full-image {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
    }
}

/* Landscape Mobile Styles */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .section {
        min-height: 100vh;
        margin: 10px 0;
    }

    .full-image {
        height: auto;
        width: auto;
        max-width: 95%;
        max-height: 90vh;
    }
}

/* iPhone SE and smaller devices */
@media screen and (max-width: 375px) {
    .container {
        padding: 3px 0;
    }

    .section {
        min-height: 100vh;
        margin: 10px 0;
        padding: 3px;
    }

    .full-image {
        width: 100%;
        height: auto;
        max-height: 90vh;
        margin: 5px 0;
    }
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .section {
        scroll-snap-align: center;
        touch-action: pan-y pinch-zoom;
    }
    
    .full-image {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .smooth-scroll {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
}

/* Smooth transition between sections */
.section {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

/* Loading animation */
.section {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

/* Smooth Scroll Utilities */
.smooth-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    transition: all 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.section.active {
    transform: scale(1);
    opacity: 1;
}

.section:not(.active) {
    transform: scale(0.98);
    opacity: 0.8;
}

/* Prevent Scroll Chaining */
body {
    overscroll-behavior: contain;
}

/* Typography Base Styles */
h1, h2, h3, .script-font {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: normal;
    line-height: 1.3;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

/* Section Typography */
.section h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.section h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.section p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Additional style for better text spacing */
.overlay-text h2:last-of-type {
    margin-bottom: 2rem;
}

/* Enhance text shadow for better readability on light backgrounds */
.section {
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Remove any potential spacing from images */
img {
    display: block;
    margin: 0;
}

/* Portrait Mode */
@media screen and (orientation: portrait) {
    .full-image {
        object-position: center;
    }
}

/* Landscape Mode */
@media screen and (orientation: landscape) {
    .full-image {
        object-position: center;
    }
}

/* Ucapan dan Doa Styles */
.wrapper {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    padding: 20px;
    z-index: 10;
}

.wrapper h2 {
    text-align: center;
    color: #7a2c2c;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

#ucapanForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: -20px;
}

#ucapanForm input::placeholder,
#ucapanForm textarea::placeholder {
    color: rgba(0, 0, 0, 0.8);
    text-align: center;
    opacity: 0.9;
}

#ucapanForm input, 
#ucapanForm textarea {
    width: 50%;
    padding: 12px 24px;
    margin: 10px 0;
    border-radius: 25px;
    border: none;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    background: rgba(255, 255, 255, 0.9);
    color: rgb(0, 0, 0);
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#ucapanForm textarea {
    min-height: 100px;
    resize: vertical;
}

#ucapanForm input:focus,
#ucapanForm textarea:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

#ucapanForm button {
    background: rgba(128, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: normal;
    cursor: pointer;
    width: 50%;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#ucapanForm button:hover {
    background-color: rgba(128, 0, 0, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#hasilUcapan {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ucapan {
    margin-top: 10px;
    padding: 15px 24px;
    border: none;
    border-radius: 25px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: rgb(0, 0, 0);
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    width: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.ucapan b {
    color: rgb(0, 0, 0);
    font-size: 1.1em;
    display: block;
    text-align: center;
    margin-bottom: 5px;
}

.ucapan q {
    display: block;
    margin: 8px 0;
    font-style: italic;
    color: rgba(0, 0, 0, 0.9);
    text-align: center;
}

.ucapan small {
    display: block;
    font-size: 0.8em;
    color: rgba(0, 0, 0, 0.7);
    text-align: center;
    margin-top: 5px;
}

/* Custom scrollbar untuk hasilUcapan */
#hasilUcapan::-webkit-scrollbar {
    width: 5px;
}

#hasilUcapan::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#hasilUcapan::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    #ucapanForm input, 
    #ucapanForm textarea,
    #ucapanForm button,
    .ucapan {
        width: 80%;
        font-size: 1rem;
        padding: 10px 20px;
    }
}

@media screen and (max-width: 480px) {
    #ucapanForm input, 
    #ucapanForm textarea,
    #ucapanForm button,
    .ucapan {
        width: 90%;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .ucapan {
        padding: 12px 16px;
    }
    
    #hasilUcapan {
        max-height: 250px;
    }
}

@media screen and (max-width: 768px) {
    .btn-lokasi {
        padding: 10px 20px;
        font-size: 1rem;
        bottom: 20px;
        min-width: 160px;
    }
    
    .btn-lokasi svg {
        width: 18px;
        height: 18px;
    }
}

@media screen and (max-width: 480px) {
    .btn-lokasi {
        padding: 8px 16px;
        font-size: 0.9rem;
        bottom: 15px;
        min-width: 140px;
        gap: 6px;
    }
    
    .btn-lokasi svg {
        width: 16px;
        height: 16px;
    }
}
