@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* <----------------container-one-----------------> */
.container-one {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: url('/images/index01.jpg') no-repeat center center/cover;
    color: #333;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    padding: 2% 4%;
    margin-top: 98px;
}

/* Typography */
.text-section {
    background-color: #ffffffd9;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    border-left: 4px solid #013D66;
    max-width: 85%;
}

.heading-container {
    padding: 15px 25px;
    background-color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content h1 {
    font-size: clamp(1.8rem, 5vw, 4rem);
    text-align: start;
    font-weight: 600;
    margin: 0;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    line-height: 1.3;
    color: #013D66;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.title-divider {
    height: 3px;
    width: 120px;
    background: linear-gradient(90deg, #013D66, transparent);
    margin-top: 15px;
    border-radius: 2px;
}

.content-row {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.text-section p {
    font-size: clamp(0.9rem, 1.8vw, 1.4rem);
    font-weight: 400;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    line-height: 1.8;
    margin: 0 0 10px 0;
    color: #333;
}

.highlight {
    font-weight: 700;
    color: #0B6DA3;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.service-tag {
    background-color: #EFF7FF;
    color: #013D66;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: clamp(0.8rem, 1.3vw, 1.1rem);
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(1, 61, 102, 0.2);
    transition: all 0.3s ease;
}

.service-tag:hover {
    background-color: #013D66;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-section {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(0.8rem, 1.3vw, 1.1rem);
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    background-color: #013D66;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: #0B6DA3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    font-size: 1.2rem;
}

/* <----------------container-two-----------------> */
.container-two {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    min-height: 100vh;
    padding: 40px 20px;
    background-color: #fff;
}

.text-content {
    max-width: 700px;
    padding: 0 15px;
}

.text-content h1 {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    margin: 0;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    text-align: center;
    font-weight: lighter;
}

.text-content p {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    margin-top: 10px;
    line-height: 1.6;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    text-align: center;
    font-weight: lighter;
}

.container-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.container-button button a {
    padding: 12px 25px;
    background: linear-gradient(135deg, #013D66, #0B6DA3);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: lighter;
    text-decoration: none;
    display: inline-block;
}

.container-button button {
    background: none;
    border: none;
    cursor: pointer;
}

.container-button button:active {
    transform: scale(0.95);
    animation: clickEffect 0.2s;
}

.container-button button:hover a {
    background: linear-gradient(135deg, #0B3A53, #0E4D75);
    transform: translateY(-5px) scale(1.05);
}

.image-content {
    max-width: 400px;
    padding: 0 15px;
}

.image-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* <----------------container-three-----------------> */
.container-three {
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
}

.focus-title {
    margin-right: 50px;
}

.focus-title h2 {
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: normal;
    text-align: left;
    color: #ccc;
}

.focus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    grid-gap: 20px;
    width: 100%;
    max-width: 1000px;
}

.focus-item {
    padding: 30px;
    background-color: #fff;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

.focus-item h3 {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: normal;
    margin-bottom: 10px;
}

.focus-item p {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
}

.child-custody {
    background-color: #013a63;
    color: white;
}

.divorce {
    background-color: #eae7db;
    color: black;
}

.complex-litigation {
    background-color: #f5f5f5;
    color: black;
}

.gavel-image {
    padding: 0;
}

.gavel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* <----------------container-four-----------------> */
.container-four {
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-weight: lighter;
}

.container-services {
    padding: 40px 20px;
}

.services-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.row-services {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 20px;
    width: 95%;
}

.services-heading {
    font-size: clamp(1.8rem, 4vw, 4rem);
    margin-top: 20px;
    font-weight: normal;
}

.services-description {
    color: #777;
    margin: 20px 0;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
}

.box-description ul {
    list-style-type: disc;
    text-align: left;
    max-width: 600px;
    padding-left: 20px;
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
}

.row-news {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card {
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 380px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.card-container {
    padding: 15px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card:hover .overlay {
    opacity: 1;
}

.image-container img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* <----------------container-five-----------------> */
.container-five {
    font-family: 'Libre Baskerville', 'Noto Sans Thai', serif;
    font-weight: lighter;
    background-color: #e8e2d9;
    color: #333;
    text-align: center;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
    padding: 40px 0;
}

.container-testimonial {
    width: 90%;
    margin: 0 auto;
    padding: 20px;
}

.title {
    font-size: clamp(2rem, 5vw, 5rem);
    margin-bottom: 10px;
}

.subtitle {
    font-size: clamp(1.2rem, 2.5vw, 2.5rem);
    margin-bottom: 30px;
}

.testimonials {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.testimonial {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 400px;
    flex: 1 1 300px;
    margin-bottom: 20px;
}

.quote {
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    color: #3b6b92;
}

.text {
    font-size: clamp(0.9rem, 1.5vw, 1.5rem);
    line-height: 1.5;
    margin-top: 20px;
}

.testimonial hr {
    margin-top: 30px;
    border: 1px solid #e8e2d9;
}

.author {
    font-weight: bold;
    font-size: clamp(0.9rem, 1.5vw, 1.5rem);
    margin-top: 20px;
}

/* Media Queries */
@media (max-width: 991px) {
    .container-two {
        flex-direction: column;
        text-align: center;
    }
    
    .text-content {
        margin-bottom: 30px;
        order: 1;
    }
    
    .image-content {
        order: 2;
        margin: 0 auto;
    }
    
    .focus-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .focus-title {
        margin-right: 0;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .container-three {
        flex-direction: column;
    }
    
    .services-image {
        height: 250px;
    }
    
    .row-services {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container-one {
        margin-top: 60px;
    }
    
    .text-section {
        max-width: 100%;
    }
    
    .heading-container {
        width: 100%;
    }
    
    .services-grid {
        justify-content: center;
    }
    
    .contact-section {
        justify-content: center;
        width: 100%;
    }
    
    .card {
        width: 100%;
    }
    
    .testimonial {
        flex: 1 1 100%;
    }
}

@media (max-width: 576px) {
    .container-one {
        padding: 20px 15px;
        margin-top: 50px;
    }
    
    .contact-item {
        width: 100%;
        justify-content: center;
    }
    
    .image-content {
        max-width: 100%;
    }
    
    .services-image {
        height: 200px;
    }
    
    .title {
        font-size: clamp(1.8rem, 4vw, 3rem);
    }
    
    .subtitle {
        font-size: clamp(1rem, 2vw, 1.5rem);
    }
}