/* Contact & About Pages CSS - เสริมสำหรับ contact.php และ about.php */

/* Common Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
}

.page-header::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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-title {
    position: relative;
    z-index: 2;
    font-weight: 800;
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff 0%, #f8f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    border-radius: 2px;
}

/* Contact Page Specific Styles */
.contact-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.contact-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.contact-item:hover .contact-icon::before {
    left: 100%;
}

.social-icon {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.social-icon:hover::before {
    transform: scale(1);
}

.social-icon i {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.social-icon:hover i {
    color: white;
}

/* Contact Form Enhancements */
.contact-form-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.form-control:focus,
.form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.contact-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.contact-form .btn-primary:hover::before {
    left: 100%;
}

/* FAQ Animations */
.faq-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
}

.faq-item:hover::before {
    left: 0;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* About Page Specific Styles */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-icon {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.stat-item:hover .stat-icon::before {
    transform: scale(1);
}

.stat-number {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item:hover .stat-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.1);
}

/* Value Items Hover Effects */
.value-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-item:hover::before {
    opacity: 1;
}

.value-item:hover .value-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Process Steps */
.process-step {
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-10px);
}

.process-number {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.process-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.process-step:hover .process-number::before {
    transform: scale(1);
}

/* Team Members */
.team-member {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member:hover::before {
    opacity: 1;
}

.team-photo {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.team-member:hover .team-photo {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-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 100 100"><defs><radialGradient id="fade" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1)"/><stop offset="100%" style="stop-color:transparent"/></radialGradient></defs><circle cx="50" cy="50" r="50" fill="url(%23fade)"/></svg>');
    opacity: 0.5;
}

.cta-buttons .btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.cta-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.cta-buttons .btn:hover::before {
    left: 100%;
}

/* Loading Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.contact-item,
.stat-item,
.value-item,
.process-step,
.team-member,
.faq-item {
    animation: fadeInUp 0.6s ease forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* Print Styles */
@media print {
    .page-header {
        background: #ffffff !important;
        color: rgb(11, 11, 11) !important;
    }
    
    .social-icons,
    .cta-buttons {
        display: none;
    }
    
    .contact-form,
    .faq-section {
        page-break-inside: avoid;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .contact-info,
    .contact-form-wrapper,
    .stats-section,
    .value-item,
    .process-section,
    .team-member,
    .faq-section {
        background: #ffffff !important;
        color: rgb(0, 0, 0) !important;
    }
    
    .contact-details h5,
    .section-title,
    .value-item h4,
    .process-step h5,
    .team-member h5,
    .faq-item h5 {
        color: rgb(255, 255, 255) !important;
    }
}

/* Accessibility Improvements */
.contact-form .form-control:focus,
.contact-form .form-select:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

.btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Updated Contact & About Hero Sections */
.contact-hero-section,
.about-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.contact-hero-section::before,
.about-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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.2"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.2"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

/* Updated Contact Card Styles */
.contact-info-card .card,
.contact-form-card .card,
.about-content-card .card,
.about-image-card .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

.contact-info-card .card:hover,
.contact-form-card .card:hover,
.about-content-card .card:hover,
.about-image-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,123,255,0.1);
    border-radius: 50%;
    font-size: 1.2rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,123,255,0.4);
    color: white;
}

/* Form Styling Updates */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.3);
    background: linear-gradient(135deg, #0056b3, #004085);
}

/* FAQ Cards */
.faq-card .card {
    transition: all 0.3s ease;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.faq-card .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border-left-color: #0056b3;
}

/* About Page Image Cards */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.card-img-wrapper img {
    transition: transform 0.3s ease;
    height: 300px;
    object-fit: cover;
    width: 100%;
}

.card-img-wrapper:hover img {
    transform: scale(1.05);
}

.img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 2rem 1.5rem 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-img-wrapper:hover .img-overlay {
    opacity: 1;
}

/* Statistics Section Updates */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stat-card {
    background: white;
    padding: 2rem 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Responsive Design Updates */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .contact-hero-section,
    .about-hero-section {
        padding: 2.5rem 0;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .card-img-wrapper img {
        height: 200px;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .footer-links .footer-link {
        display: block;
        margin: 0.25rem 0;
    }
}

/* Legal Pages Styles (Privacy Policy & Terms) */
.page-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-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 100 100"><defs><pattern id="legal-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><rect width="50" height="50" fill="none"/><path d="M0,25 Q25,0 50,25 Q25,50 0,25" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23legal-pattern)"/></svg>');
}

.legal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.update-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    color: #1565c0;
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.legal-section h2 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    position: relative;
}

.legal-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.legal-section h3 {
    color: #34495e;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem 0;
}

.legal-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.legal-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    color: #555;
    line-height: 1.6;
}

.legal-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

.contact-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #495057;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.back-to-top-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.back-to-top-section .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-top-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

/* Legal Pages Responsive Design */
@media (max-width: 991px) {
    .legal-content {
        padding: 1.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-section h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .page-hero-section {
        padding: 2.5rem 0;
    }
    
    .legal-content {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .legal-section {
        margin-bottom: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.2rem;
        padding-left: 0.75rem;
    }
    
    .legal-section h2::before {
        width: 3px;
    }
    
    .legal-list li {
        padding-left: 1.5rem;
    }
    
    .update-notice {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
}

@media (max-width: 575px) {
    .legal-section p {
        text-align: left;
    }
    
    .legal-section h2 {
        font-size: 1.1rem;
    }
    
    .legal-section h3 {
        font-size: 1rem;
    }
    
    .back-to-top-section .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}