/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Bai Jamjuree', sans-serif;
    margin: 0;
    background-image: url(./images/bg-header-mobile.png);
    background-repeat: no-repeat;
    background-size: contain;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 130px 20px 50px;
    max-width: 650px;
    margin: 0 auto;
}

.hero h1 {
    color: hsl(210, 10%, 33%);
    font-weight: 600;
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.hero p {
    color: hsl(201, 11%, 66%);
    line-height: 1.6;
    font-weight: 400;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Snippets & Features */
.snippets {
    padding: 80px 20px;
    text-align: center;
}

.snippets-intro {
    max-width: 700px;
    margin: 0 auto 80px;
}

.snippets h2 {
    color: hsl(210, 10%, 33%);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.snippets p {
    color: hsl(201, 11%, 66%);
    line-height: 1.6;
}

.features-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.features-image {
    width: 100%;
}

.features-image img {
    width: 100%;
    max-width: 600px;
}

.features-list {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.feature-item h3 {
    color: hsl(210, 10%, 33%);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
    color: hsl(201, 11%, 66%);
    line-height: 1.6;
}

/* Reusable Button Styles */
.buttons {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    padding: 0 20px;
    margin-bottom: 3rem;
}

.buttons a {
    text-decoration: none;
    color: white;
    padding: 15px;
    text-align: center;
    width: 100%;
    border-radius: 30px;
    font-weight: 600;
    transition: opacity 0.7s;
}

/* iOS Button (Green) */
.buttons a:nth-child(1) {
    background-color: hsl(171, 66%, 44%);
    box-shadow: 0 10px 20px -10px hsl(171, 66%, 44%);
}

/* Mac Button (Blue) */
.buttons a:nth-child(2) {
    background-color: hsl(233, 100%, 69%);
    box-shadow: 0 10px 20px -10px hsl(233, 100%, 69%);
}

.buttons a:hover {
    opacity: 0.8;
}

/* Access Section */
.access-section {
    text-align: center;
    padding: 100px 20px;
    margin: 0 auto;
}

.access-section .content {
    max-width: 700px;
    margin: 0 auto;
}

.access-section h2 {
    color: hsl(210, 10%, 33%);
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.access-section p {
    color: hsl(201, 11%, 66%);
    line-height: 1.6;
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.devices {
    margin-top: 80px;
}

.devices img {
    width: 900px;
    max-width: 100%;
}

/* Workflow Section */
.workflow {
    padding: 80px 20px;
    text-align: center;
}

.workflow h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: hsl(210, 10%, 33%);
}

.section-text {
    color: hsl(201, 11%, 66%);
    max-width: 600px;
    margin: 0 auto 50px;
}

.log {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.workflow-item img {
    margin-bottom: 20px;
}

.workflow-item h3 {
    margin-bottom: 10px;
    color: hsl(210, 10%, 33%);
}

.workflow-item p {
    color: hsl(201, 11%, 66%);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Company Logos */
.companies {
    padding: 80px 20px;
}

.logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.logos img {
    max-width: 120px;
    opacity: 0.7;
    transition: 0.3s ease;
}

.logos img:hover {
    opacity: 1;
}

/* Call to Action Section */
.cta {
    text-align: center;
    padding: 50px 20px;
    margin: 0 auto;
    max-width: 700px;
}

.cta h2 {
    color: hsl(210, 10%, 33%);
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    color: hsl(201, 11%, 66%);
    line-height: 1.6;
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Footer Section */
footer {
    background-color: hsl(220, 18%, 97%);
    padding: 50px 0;
    margin-top: 50px;
}

.official {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.official img {
    width: 50px;
    height: auto;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-links a {
    text-decoration: none;
    color: hsl(210, 10%, 33%);
    font-weight: 600;
    transition: color 0.7s;
}

.footer-links a:hover {
    color: hsl(171, 66%, 44%);
}

.social-icons {
    display: flex;
    gap: 25px;
}

.social-icons img {
    width: 20px;
    height: auto;
    transition: opacity 0.9s;
}

.social-icons img:hover {
    opacity: 0.8;
}

/* Desktop Layout Adjustments */
@media (min-width: 768px) {
    body {
        background-image: url(./images/bg-header-desktop.png);
    }

    .features-grid {
        flex-direction: row;
        text-align: left;
        gap: 100px;
    }

    .features-image {
        flex: 1;
        margin-left: -150px;
    }

    .features-image img {
        max-width: none;
        width: auto;
    }

    .features-list {
        flex: 1;
        text-align: left;
        padding-top: 50px;
    }

    .feature-item p {
        margin: 0;
    }

    .buttons {
        flex-direction: row;
        padding: 0; 
    }

    .buttons a {
        width: auto;
    }

    .log {
        flex-direction: row;
        justify-content: space-between;
    }

    .official {
        flex-direction: row;
        justify-content: space-between;
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .official .footer-logo {
        margin-left: 70px;
    }

    .footer-links {
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        gap: 10px 80px;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .features-image {
        margin-left: 0;
    }
    
    .features-image img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 600px) {
    .logos {
        flex-direction: column;
    }
}
