/*
 * OS-Tech Website Styles
 * Color Scheme: Green, Blue, White
 * Website: os-tech.in.th
 */

/* =====================================================
   CSS Variables
   ===================================================== */
:root {
    /* Primary Colors - Based on Logo */
    --os-green: #1B8751;
    --os-green-dark: #146B40;
    --os-green-light: #2AAF6A;

    --os-blue: #0099CC;
    --os-blue-dark: #0077AA;
    --os-blue-light: #33BBEE;
    --os-cyan: #00BCD4;

    /* Background Colors */
    --os-white: #FFFFFF;
    --os-light-green: #E8F5E9;
    --os-light-blue: #E3F2FD;
    --os-light-cyan: #E0F7FA;
    --os-gray-light: #F5F7FA;

    /* Text Colors */
    --os-text-dark: #333333;
    --os-text-gray: #666666;
    --os-text-light: #999999;

    /* Gradients */
    --os-gradient-primary: linear-gradient(135deg, var(--os-green) 0%, var(--os-blue) 100%);
    --os-gradient-hero: linear-gradient(135deg, var(--os-blue-dark) 0%, var(--os-green) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition: all 0.3s ease;
}

/* =====================================================
   Reset & Base
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--os-text-dark);
    background-color: var(--os-white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

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

a:hover {
    color: var(--os-blue);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--os-gradient-primary);
    color: var(--os-white);
    box-shadow: 0 4px 15px rgba(27, 135, 81, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 135, 81, 0.4);
    color: var(--os-white);
}

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

.btn-secondary:hover {
    background: var(--os-green);
    color: var(--os-white);
}

.btn-outline {
    background: transparent;
    color: var(--os-white);
    border: 2px solid var(--os-white);
}

.btn-outline:hover {
    background: var(--os-white);
    color: var(--os-green);
}

.btn-white {
    background: var(--os-white);
    color: var(--os-green);
}

.btn-white:hover {
    background: var(--os-light-green);
    color: var(--os-green-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

/* =====================================================
   Navigation
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--os-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 15px 0;
}

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

.navbar .logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--os-text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--os-gradient-primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--os-green);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--os-text-dark);
    cursor: pointer;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    background: var(--os-gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--os-white);
    padding: 120px 20px 80px;
    position: relative;
}

.hero-content {
    max-width: 900px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
}

/* =====================================================
   Stats Section
   ===================================================== */
.stats {
    padding: 60px 0;
    background: var(--os-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 30px;
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--os-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--os-white);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--os-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--os-text-gray);
    font-size: 1rem;
}

/* =====================================================
   Section Headers
   ===================================================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.25rem;
    background: var(--os-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--os-text-gray);
    font-size: 1.1rem;
}

/* =====================================================
   Services Section
   ===================================================== */
.services {
    padding: 100px 0;
    background: var(--os-light-green);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--os-white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

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

.service-icon {
    width: 90px;
    height: 90px;
    background: var(--os-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    color: var(--os-white);
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 15px;
    color: var(--os-text-dark);
}

.service-card > p {
    color: var(--os-text-gray);
    margin-bottom: 20px;
}

.service-features {
    text-align: left;
    margin-bottom: 25px;
}

.service-features li {
    padding: 8px 0;
    color: var(--os-text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-features li i {
    color: var(--os-green);
    font-size: 0.9rem;
}

/* =====================================================
   Why Us Section
   ===================================================== */
.why-us {
    padding: 100px 0;
    background: var(--os-white);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-item {
    text-align: center;
    padding: 30px 20px;
}

.why-icon {
    width: 70px;
    height: 70px;
    background: var(--os-light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.75rem;
    color: var(--os-blue);
    transition: var(--transition);
}

.why-item:hover .why-icon {
    background: var(--os-gradient-primary);
    color: var(--os-white);
}

.why-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.why-item p {
    color: var(--os-text-gray);
    font-size: 0.95rem;
}

/* =====================================================
   About Section
   ===================================================== */
.about {
    padding: 100px 0;
    background: var(--os-light-blue);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    font-size: 2.25rem;
    background: var(--os-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.about-content .lead {
    font-size: 1.1rem;
    color: var(--os-text-dark);
}

.vision-box,
.mission-box {
    background: var(--os-white);
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    border-left: 4px solid var(--os-green);
}

.vision-box h4,
.mission-box h4 {
    color: var(--os-green);
    margin-bottom: 10px;
}

.vision-box h4 i,
.mission-box h4 i {
    margin-right: 10px;
}

.mission-box ul {
    margin-top: 10px;
}

.mission-box li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.mission-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--os-gradient-primary);
    border-radius: 50%;
}

.expertise-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.expertise-card {
    background: var(--os-white);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.expertise-card i {
    font-size: 2.5rem;
    background: var(--os-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: block;
}

.expertise-card span {
    font-weight: 500;
    color: var(--os-text-dark);
}

/* =====================================================
   CTA Section
   ===================================================== */
.cta {
    padding: 80px 0;
    background: var(--os-gradient-hero);
    text-align: center;
    color: var(--os-white);
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

/* =====================================================
   Contact Section
   ===================================================== */
.contact {
    padding: 100px 0;
    background: var(--os-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.contact-info > p {
    color: var(--os-text-gray);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: var(--os-light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--os-green);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    margin-bottom: 3px;
}

.contact-item p {
    color: var(--os-text-gray);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--os-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--os-white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--os-blue);
    transform: scale(1.1);
}

/* Contact Form */
.contact-form {
    background: var(--os-gray-light);
    padding: 40px;
    border-radius: 16px;
}

.contact-form h3 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--os-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--os-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--os-green);
    box-shadow: 0 0 0 3px rgba(27, 135, 81, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--os-white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-col h4 {
    color: var(--os-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--os-green);
    display: inline-block;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a,
.footer-col ul li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--os-cyan);
    padding-left: 5px;
}

.footer-col ul li i {
    margin-right: 10px;
    color: var(--os-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--os-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid #eee;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: 140px 20px 100px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .expertise-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4 {
        display: block;
    }
}

@media (max-width: 480px) {
    .expertise-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form {
        padding: 25px;
    }
}

/* =====================================================
   Portfolio Section
   ===================================================== */
.portfolio {
    padding: 100px 0;
    background: var(--os-white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 40px;
}

.portfolio-item {
    background: var(--os-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 135, 81, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay {
    flex-direction: column;
    gap: 10px;
}

.portfolio-overlay i {
    font-size: 2rem;
    color: var(--os-white);
}

.portfolio-overlay span {
    color: var(--os-white);
    font-size: 0.9rem;
    font-weight: 500;
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--os-text-dark);
}

.portfolio-info p {
    color: var(--os-text-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.portfolio-tag {
    display: inline-block;
    background: var(--os-light-green);
    color: var(--os-green);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* =====================================================
   Map Section
   ===================================================== */
.map-container {
    margin-top: 60px;
}

.map-container h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--os-text-dark);
}

.map-container h3 i {
    color: var(--os-green);
    margin-right: 10px;
}

.map-wrapper {
    position: relative;
    text-align: center;
}

.map-wrapper iframe {
    box-shadow: var(--shadow-md);
}

.map-btn {
    margin-top: 20px;
}

.map-btn i {
    margin-right: 8px;
}

/* =====================================================
   Portfolio Modal
   ===================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--os-white);
    margin: 20px;
    max-width: 900px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.modal-info {
    padding: 30px;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    background: var(--os-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-info p {
    color: var(--os-text-gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--os-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
    color: var(--os-cyan);
    transform: scale(1.2);
}

/* Gallery Styles */
.modal-gallery {
    position: relative;
    display: flex;
    align-items: center;
    background: #000;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 500px;
}

.gallery-main img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--os-green);
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: var(--os-green);
    color: var(--os-white);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    overflow-x: auto;
    justify-content: center;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    border: 3px solid transparent;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--os-green);
}

.gallery-counter {
    text-align: center;
    padding: 10px;
    background: #f5f5f5;
    color: var(--os-text-gray);
    font-size: 0.9rem;
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations - add via JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
