/* 
 * Main styles for maddychearyaiporn.pw 
 * Unique design with navy and red accents
 */

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #f28482;
    --secondary: #1d3557;
    --secondary-light: #457b9d;
    --accent: #a8dadc;
    --light-bg: #f1faee;
    --dark: #293241;
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --gradient-primary: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
    --gradient-secondary: linear-gradient(135deg, #1d3557 0%, #457b9d 100%);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--secondary);
}

h1 {
    font-size: 3.2rem;
    font-weight: 700;
}

h2 {
    font-size: 2.6rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.8rem;
    color: var(--secondary);
}

h4 {
    font-size: 1.4rem;
    color: var(--secondary);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
}

.accent-text {
    color: var(--primary);
    position: relative;
}

.accent-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--primary);
    opacity: 0.2;
    z-index: -1;
}

.tagline {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 0;
    background-color: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

header.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-md);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu li a {
    color: var(--secondary);
    font-weight: 600;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-menu li a:hover {
    color: var(--primary);
}

.nav-menu li a:hover::after {
    width: 100%;
}

.btn-nav {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.btn-nav:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 6px 0;
    background-color: var(--secondary);
    border-radius: 3px;
    transition: var(--transition);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-tertiary {
    background: var(--secondary);
    color: var(--white);
}

.btn-tertiary:hover {
    background: var(--secondary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
}

.btn-small:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    background-color: var(--white);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--light-bg);
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 60px 60px 0;
    border-color: transparent var(--accent) transparent transparent;
    transition: var(--transition);
    opacity: 0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    margin-bottom: 0;
}

/* Technology Section */
.technology {
    padding: 7rem 0;
    background-color: var(--white);
}

.tech-content {
    display: flex;
    align-items: center;
    gap: 5rem;
    margin-top: 4rem;
}

.tech-visual {
    flex: 1;
}

.tech-info {
    flex: 1;
}

.tech-info h3 {
    margin-bottom: 1.5rem;
}

.tech-info p {
    margin-bottom: 2rem;
}

.tech-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.tech-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
    color: var(--secondary);
}

/* Gallery Section */
.gallery {
    padding: 6rem 0;
    background-color: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    background-color: var(--white);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(29, 53, 87, 0.9), rgba(29, 53, 87, 0));
    transform: translateY(100%);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.gallery-info {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding-top: 2rem;
}

/* FAQ Section */
.faq {
    padding: 7rem 0;
    background-color: var(--white);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 2.5rem;
}

.faq-item {
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.faq-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.faq-item p {
    margin-bottom: 0;
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background: var(--gradient-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.cta .btn-primary {
    background-color: var(--white);
    color: var(--primary);
}

.cta .btn-primary:hover {
    background-color: var(--secondary);
    color: var(--white);
}

/* Footer Section */
footer {
    padding: 5rem 0 2rem;
    background-color: var(--secondary);
    color: var(--white);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo p {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 350px;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-nav h4, .footer-legal h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-nav h4::after, .footer-legal h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-nav ul, .footer-legal ul {
    list-style: none;
}

.footer-nav ul li, .footer-legal ul li {
    margin-bottom: 0.8rem;
}

.footer-nav ul li a, .footer-legal ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-nav ul li a:hover, .footer-legal ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Media Queries */
@media (max-width: 992px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.3rem;
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .tech-content {
        flex-direction: column-reverse;
        gap: 3rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 12px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .menu-toggle {
        display: block;
        z-index: 1002;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem 0;
        transition: right 0.3s ease;
        z-index: 1001;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .footer-logo p {
        max-width: 100%;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-nav h4::after, .footer-legal h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    html {
        font-size: 11px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn {
        width: 100%;
    }
    
    .features-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }
}
