/* About Page Styles */
.about-section { 
    padding: 100px 0; 
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.about-card {
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    padding: 40px;
    margin: 0 auto 30px;
    max-width: 1200px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.about-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #fff;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-title span {
    position: relative;
    display: inline-block;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.history-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

.history-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: 100%;
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.history-image:hover img {
    transform: scale(1.05);
}

.timeline-title {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    font-weight: 600;
}

.timeline-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.timeline {
    position: relative;
    padding: 0;
    margin: 0;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-year {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(59, 130, 246, 0.3);
    z-index: 1;
}

.timeline-item {
    position: relative;
    padding: 0 0 40px 80px;
    margin: 0;
    transition: all 0.3s ease;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-year {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-year {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

.timeline-content {
    background: rgba(30, 41, 59, 0.8);
    padding: 25px 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 30px;
    width: 15px;
    height: 15px;
    background: #3b82f6;
    transform: rotate(45deg);
    border-left: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-item:hover .timeline-content {
    transform: translateX(5px);
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
}

.timeline-content h3 {
    color: #60a5fa;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.timeline-content p {
    color: #e5e7eb;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

.achievements {
    margin-top: 40px;
}

.achievements h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.achievement-item {
    background: rgba(15, 23, 42, 0.5);
    padding: 30px 25px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.achievement-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.achievement-item:hover i {
    transform: scale(1.1);
    background: linear-gradient(135deg, #5f9fff, #3b7bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.achievement-item i {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: #3b82f6;
    font-size: 28px;
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.achievement-item h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.achievement-item p {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin: 0;
}

.company-mission {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
}

.company-mission::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    z-index: -1;
}

.company-mission p {
    color: #e5e7eb;
    line-height: 1.8;
    margin: 0;
    font-style: italic;
}

/* Vision & Mission Section */
.vision-mission {
    text-align: center;
}

.vision-mission .section-title {
    margin-bottom: 40px;
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.vision-card, .mission-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vision-card:hover, .mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.vision-card h3, .mission-card h3 {
    color: #3b82f6;
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.vision-card h3::after, .mission-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.vision-card p, .mission-card p {
    color: #e5e7eb;
    line-height: 1.8;
    margin-bottom: 15px;
}

.vision-card ul, .mission-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vision-card li, .mission-card li {
    color: #e5e7eb;
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
}

.vision-card li::before, .mission-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Gallery & CSR Styles - Matching ISO Training Section */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-img {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.gallery-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Add overlay effect on hover */
.gallery-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.gallery-img:hover::after {
    opacity: 1;
}

/* Special styling for ISO image */
img[src*="ISO.jpg"] {
    object-fit: contain;
    background-color: white;
    padding: 15px;
    width: 100%;
    height: 250px;
    transition: all 0.3s ease;
}

img[src*="ISO.jpg"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Special styling for โรงงานสีขาว image */
img[src*="โรงงานสีขาว.jpg"] {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 250px;
}

/* CSR Items Styling */
.csr-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.csr-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.csr-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.csr-item:hover img {
    transform: scale(1.05);
}

/* CSR Description */
.csr-description {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .history-container {
        grid-template-columns: 1fr;
    }
    
    .history-image {
        height: 400px;
        margin-bottom: 30px;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Portfolio/Gallery Section */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Special styling for ISO image */
img[src*="ISO.jpg"] {
    object-fit: contain;
    background-color: white;
    padding: 10px;
    width: 100%;
    height: 250px;
}

/* Special styling for โรงงานสีขาว image */
img[src*="โรงงานสีขาว.jpg"] {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 250px;
}

/* Responsive adjustments */
/* iPad Portrait Mode */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: portrait) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 100%;
        margin: 2rem 0;
    }
    
    .gallery-img,
    .csr-item img {
        height: 200px;
    }
    
    .about-card {
        padding: 30px 20px;
        margin: 0 0 30px;
    }
}

/* General Responsive Adjustments */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .gallery-img, 
    .csr-item img {
        height: 220px;
    }
    
    .csr-description {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .history-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
        margin: 2rem 0;
    }
    
    .gallery-img,
    .csr-item img {
        height: 180px;
    }
    
    .history-image {
        height: 300px;
    }
    
    .timeline::before {
        left: 20px;
        background: linear-gradient(to bottom, #1e3c72, #2a5298);
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-year {
        left: -15px;
        background: linear-gradient(135deg, #1e3c72, #2a5298);
    }
    
    .vision-mission-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
        margin: 2rem 0;
    }
    
    .csr-item {
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .csr-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }
    
    .csr-caption {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 10px 15px;
        font-size: 0.9rem;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .csr-item:hover .csr-caption {
        background: rgba(30, 64, 175, 0.9);
    }
    
    .csr-description {
        max-width: 800px;
        margin: 0 auto 30px;
        text-align: center;
        color: #e2e8f0;
        line-height: 1.7;
    }
    
    .about-card {
        padding: 25px 20px;
        margin: 0 15px 30px;
    }
    
    .portfolio-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .gallery-img,
    .csr-item img {
        height: 250px;
        width: 100%;
        max-width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}
