/**
 * Phuket Grid Block Styles
 * Modern Travel Photography Grid with 3x3 layout
 */

.phuket-grid-block {
    padding: 60px 0;
    background-color: var(--white-1, #ffffff);
}

.phuket-grid-block .h2 {
    text-align: center;
    margin-bottom: 40px;
}

/* Grid Container - 3 columns x 3 rows */
.phuket-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    max-width: 1326px;
    margin: 0 auto;
}

/* Grid Item - sharp corners */
.phuket-grid__item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0;
}

.phuket-grid__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

/* Dark overlay for text readability */
.phuket-grid__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
}

/* Content positioning - button bottom right, text centered */
.phuket-grid__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 24px;
    z-index: 2;
}

/* Title styling - centered in middle */
.phuket-grid__title {
    font-family: "Inter", var(--font-family, sans-serif);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: center;
    margin-top: auto;
    margin-bottom: auto;
}

/* Orange button styling - more rounded */
.phuket-grid__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background-color: #ff8112;
    border-radius: 30px;
    font-family: "Inter", var(--font-family, sans-serif);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    align-self: flex-end;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 129, 18, 0.3);
}

.phuket-grid__button:hover {
    background-color: #e67500;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 129, 18, 0.4);
}

.phuket-grid__button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 129, 18, 0.3);
}

.phuket-grid__button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.phuket-grid__button:hover svg {
    transform: translateX(4px);
}

/* Hover effect on image */
.phuket-grid__item:hover .phuket-grid__image img {
    transform: scale(1.05);
}

/* Responsive - Tablet */
@media (max-width: 959px) {
    .phuket-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 16px;
    }

    .phuket-grid__title {
        font-size: 16px;
    }

    .phuket-grid__button {
        padding: 10px 18px;
        font-size: 12px;
    }

    .phuket-grid__content {
        padding: 16px;
    }
}

/* Responsive - Mobile */
@media (max-width: 599px) {
    .phuket-grid-block {
        padding: 40px 0;
    }

    .phuket-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(9, 1fr);
        gap: 12px;
    }

    .phuket-grid__item {
        aspect-ratio: 4 / 3;
    }

    .phuket-grid__title {
        font-size: 14px;
    }

    .phuket-grid__button {
        padding: 8px 14px;
        font-size: 11px;
    }

    .phuket-grid__content {
        padding: 12px;
    }
}

/* Animation on load */
@keyframes phuketGridFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phuket-grid__item {
    animation: phuketGridFadeIn 0.6s ease forwards;
}

.phuket-grid__item:nth-child(1) {
    animation-delay: 0.1s;
}
.phuket-grid__item:nth-child(2) {
    animation-delay: 0.2s;
}
.phuket-grid__item:nth-child(3) {
    animation-delay: 0.3s;
}
.phuket-grid__item:nth-child(4) {
    animation-delay: 0.4s;
}
.phuket-grid__item:nth-child(5) {
    animation-delay: 0.5s;
}
.phuket-grid__item:nth-child(6) {
    animation-delay: 0.6s;
}
.phuket-grid__item:nth-child(7) {
    animation-delay: 0.7s;
}
.phuket-grid__item:nth-child(8) {
    animation-delay: 0.8s;
}
.phuket-grid__item:nth-child(9) {
    animation-delay: 0.9s;
}
