/**
 * Thai2Idea Custom Styles
 * Digital Transformation Consultancy
 */

/* ========================================
   1. VARIABLES & RESET
======================================== */

:root {
    --primary-color: #0066CC;
    --secondary-color: #FF6B35;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;

    --font-family: 'Sarabun', sans-serif;
    --font-heading: 'Kanit', sans-serif;

    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark-color);
    background-color: #fff;
    overflow-x: hidden;
}

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

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

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

a:hover {
    color: var(--secondary-color);
}

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

/* ========================================
   2. NAVIGATION
======================================== */

.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding-left: 2rem;
}

/* ========================================
   3. BUTTONS
======================================== */

.btn {
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0052a3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #e55a2b);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e55a2b, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

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

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

.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    box-shadow: var(--box-shadow-lg);
}

/* ========================================
   4. HERO SECTION
======================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%23ffffff" fill-opacity="0.05" d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z"></path></svg>');
    background-repeat: repeat-x;
    background-position: bottom;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-section .btn {
    animation: fadeInUp 1s ease 0.4s backwards;
}

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

/* ========================================
   5. CARDS
======================================== */

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-hover {
    transition: var(--transition);
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
}

.service-card {
    position: relative;
    padding: 2rem;
    text-align: center;
}

.service-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.portfolio-card img {
    transition: var(--transition);
}

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

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

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

/* ========================================
   6. STATS/COUNTER
======================================== */

.stats-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-item .number {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.stat-item .label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========================================
   7. TESTIMONIALS
======================================== */

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.1;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-color);
}

.rating {
    color: #ffc107;
}

/* ========================================
   8. FORMS
======================================== */

.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ========================================
   9. FLOATING BUTTONS
======================================== */

.whatsapp-float, .line-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 100px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: var(--box-shadow-lg);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.line-float {
    bottom: 170px;
    background-color: #00c300;
}

.whatsapp-float:hover, .line-float:hover {
    transform: scale(1.1);
    color: white;
}

/* ========================================
   10. FOOTER
======================================== */

.footer {
    background-color: #1a1a1a;
    color: #ffffff;
}

.footer h5, .footer h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.footer p {
    color: #adb5bd;
}

.footer .text-muted {
    color: #adb5bd !important;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 10px;
}

.footer .social-links a {
    color: #ffffff;
    border-color: #ffffff;
}

.footer .social-links a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.footer .copyright {
    color: #6c757d;
    font-size: 0.9rem;
}

.footer .copyright a {
    color: #adb5bd;
    text-decoration: none;
}

.footer .copyright a:hover {
    color: #ffffff;
}

/* ========================================
   11. UTILITIES
======================================== */

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.overlay-dark {
    position: relative;
}

.overlay-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* ========================================
   12. RESPONSIVE
======================================== */

@media (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 767px) {
    .hero-section {
        min-height: 70vh;
    }

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

    .stat-item .number {
        font-size: 2.5rem;
    }

    .btn-floating {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .whatsapp-float, .line-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        right: 20px;
    }

    .line-float {
        bottom: 150px;
    }
}

/* ========================================
   13. ANIMATIONS
======================================== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   14. LOADER
======================================== */

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   15. PRELOADER
======================================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
