/**
 * Custom CSS for Department Pages
 * วิทยาลัยสารพัดช่างตราด
 * 
 * ไฟล์นี้เป็น TEMPLATE ยังไม่พร้อมใช้งาน
 */

/* ===================================
   CSS Variables
   =================================== */
:root {
    /* Primary Colors */
    --dept-primary-red: #dc3545;
    --dept-primary-orange: #ff6b35;
    --dept-primary-gold: #dfab1e;
    
    /* Neutral Colors */
    --dept-dark: #252525;
    --dept-gray: #6c757d;
    --dept-light-gray: #f8f9fa;
    --dept-white: #ffffff;
    
    /* Gradients */
    --dept-gradient-primary: linear-gradient(135deg, #dc3545 0%, #ff6b35 100%);
    --dept-gradient-secondary: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    
    /* Shadows */
    --dept-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --dept-shadow-md: 0 4px 15px rgba(0, 0, 0, 0.15);
    --dept-shadow-lg: 0 10px 30px rgba(220, 53, 69, 0.15);
    
    /* Border Radius */
    --dept-radius-sm: 8px;
    --dept-radius-md: 15px;
    --dept-radius-lg: 25px;
    
    /* Transitions */
    --dept-transition: all 0.3s ease;
}

/* ===================================
   Department Card Styles
   =================================== */
.department-card {
    transition: var(--dept-transition);
    border: none;
    border-radius: var(--dept-radius-md);
    overflow: hidden;
    height: 100%;
    background: linear-gradient(135deg, var(--dept-white) 0%, var(--dept-light-gray) 100%);
}

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--dept-shadow-lg) !important;
}

.department-card .card-body {
    position: relative;
    z-index: 1;
}

/* Icon Wrapper */
.department-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: var(--dept-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dept-transition);
    box-shadow: var(--dept-shadow-md);
}

.department-card:hover .department-icon-wrapper {
    transform: rotate(360deg) scale(1.1);
}

.department-icon-wrapper i {
    font-size: 3.5rem;
    color: var(--dept-white);
}

/* Department Title */
.department-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dept-primary-red);
    margin-bottom: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.department-subtitle {
    font-size: 0.9rem;
    color: var(--dept-gray);
    margin-bottom: 15px;
    min-height: 40px;
}

.department-description {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 80px;
}

/* ===================================
   Button Styles
   =================================== */
.btn-department {
    background: var(--dept-gradient-primary);
    border: none;
    color: var(--dept-white);
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--dept-transition);
    box-shadow: var(--dept-shadow-sm);
}

.btn-department:hover {
    background: linear-gradient(135deg, var(--dept-primary-orange) 0%, #ff8e53 100%);
    transform: scale(1.05);
    color: var(--dept-white);
    box-shadow: var(--dept-shadow-md);
}

.btn-department i {
    transition: var(--dept-transition);
}

.btn-department:hover i {
    transform: translateX(5px);
}

/* ===================================
   Personnel Card Styles
   =================================== */
.personnel-card {
    transition: var(--dept-transition);
    border-radius: var(--dept-radius-md);
    overflow: hidden;
}

.personnel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--dept-shadow-lg) !important;
}

.personnel-card img {
    transition: var(--dept-transition);
    border: 5px solid var(--dept-light-gray);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.personnel-card:hover img {
    border-color: var(--dept-light-gray);
    transform: scale(1.05);
}

.personnel-photo {
    width: min(140px, 100%);
    aspect-ratio: 1 / 1;
}

.personnel-photo-sm {
    width: min(150px, 100%);
}

.personnel-photo-lg {
    width: min(200px, 100%);
}

.personnel-name {
    color: var(--dept-primary-red);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.personnel-position {
    color: var(--dept-gray);
    font-size: 1rem;
    margin-bottom: 10px;
}

.personnel-contact {
    font-size: 0.9rem;
    color: var(--dept-dark);
}

.personnel-contact i {
    color: var(--dept-primary-red);
    margin-right: 8px;
}

/* ===================================
   Section Styles
   =================================== */
.section-header {
    background: var(--dept-gradient-primary);
    color: var(--dept-white);
    padding: 20px;
    border-radius: var(--dept-radius-md) var(--dept-radius-md) 0 0;
    margin-bottom: 0;
}

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.section-header i {
    margin-right: 15px;
    font-size: 2rem;
}

.section-content {
    background: var(--dept-white);
    padding: 30px;
    border-radius: 0 0 var(--dept-radius-md) var(--dept-radius-md);
    box-shadow: var(--dept-shadow-md);
}

/* ===================================
   Accordion Styles
   =================================== */
.accordion-item {
    border: none;
    border-radius: var(--dept-radius-sm);
    margin-bottom: 10px;
    box-shadow: var(--dept-shadow-sm);
}

.accordion-button {
    background: var(--dept-light-gray);
    color: var(--dept-dark);
    font-weight: 500;
    border-radius: var(--dept-radius-sm);
    transition: var(--dept-transition);
}

.accordion-button:not(.collapsed) {
    background: var(--dept-gradient-primary);
    color: var(--dept-white);
    box-shadow: var(--dept-shadow-md);
}

.accordion-button:hover {
    background: var(--dept-primary-red);
    color: var(--dept-white);
}

.accordion-button i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.accordion-body {
    padding: 20px;
    background: var(--dept-white);
}

/* ===================================
   Document Card Styles
   =================================== */
.document-card {
    transition: var(--dept-transition);
    border-radius: var(--dept-radius-sm);
    border: 1px solid var(--dept-light-gray);
}

.document-card:hover {
    border-color: var(--dept-primary-red);
    box-shadow: var(--dept-shadow-md);
    transform: translateY(-3px);
}

.document-icon {
    width: 60px;
    height: 60px;
    background: var(--dept-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.document-icon i {
    font-size: 1.8rem;
    color: var(--dept-white);
}

.document-title {
    color: var(--dept-dark);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.document-meta {
    font-size: 0.85rem;
    color: var(--dept-gray);
}

.btn-download {
    background: var(--dept-gradient-primary);
    border: none;
    color: var(--dept-white);
    padding: 8px 20px;
    border-radius: 50px;
    transition: var(--dept-transition);
}

.btn-download:hover {
    background: linear-gradient(135deg, var(--dept-primary-orange) 0%, #ff8e53 100%);
    color: var(--dept-white);
    transform: scale(1.1);
}

/* ===================================
   Gallery Styles
   =================================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--dept-radius-md);
    box-shadow: var(--dept-shadow-sm);
    transition: var(--dept-transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--dept-shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--dept-transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: var(--dept-white);
    transform: translateY(100%);
    transition: var(--dept-transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ===================================
   Responsibility List Styles
   =================================== */
.responsibility-list {
    counter-reset: responsibility-counter;
    list-style: none;
    padding: 0;
}

.responsibility-list li {
    counter-increment: responsibility-counter;
    position: relative;
    padding-left: 60px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dept-light-gray);
}

.responsibility-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.responsibility-list li::before {
    content: counter(responsibility-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--dept-gradient-primary);
    color: var(--dept-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

/* ===================================
   Page Header Styles
   =================================== */
.dept-page-header {
    background: linear-gradient(rgba(72, 0, 6, 0.9), rgba(114, 0, 6, 0.9));
    background-size: cover;
    background-position: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dept-page-header h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Breadcrumb Styles
   =================================== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--dept-white);
    text-decoration: none;
    transition: var(--dept-transition);
}

.breadcrumb-item a:hover {
    color: var(--dept-primary-gold);
}

.breadcrumb-item.active {
    color: var(--dept-primary-red);
}

/* ===================================
   Info Box Styles
   =================================== */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid var(--dept-primary-red);
    padding: 20px;
    border-radius: var(--dept-radius-sm);
    box-shadow: var(--dept-shadow-sm);
}

.info-box i {
    font-size: 2.5rem;
    color: var(--dept-primary-red);
}

.info-box h4 {
    color: var(--dept-primary-red);
    font-weight: 600;
    margin-bottom: 10px;
}

/* ===================================
   Responsive Styles
   =================================== */

/* Tablet */
@media (max-width: 991.98px) {
    .department-title {
        font-size: 1.3rem;
        min-height: auto;
    }
    
    .department-icon-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .department-icon-wrapper i {
        font-size: 2.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .department-title {
        font-size: 1.2rem;
    }
    
    .department-icon-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .department-icon-wrapper i {
        font-size: 2.5rem;
    }
    
    .department-description {
        min-height: auto;
    }
    
    .personnel-card img {
        max-width: 120px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .section-header {
        padding: 15px;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .section-content {
        padding: 20px;
    }
}

/* Extra Small Mobile */
@media (max-width: 575.98px) {
    .department-card .card-body {
        padding: 20px !important;
    }
    
    .department-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .department-icon-wrapper i {
        font-size: 2rem;
    }
    
    .btn-department {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .footer,
    .btn,
    .back-to-top {
        display: none !important;
    }
    
    .department-card,
    .personnel-card {
        break-inside: avoid;
        box-shadow: none !important;
    }
}

/* ===================================
   Animation Keyframes
   =================================== */
@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);
    }
}

/* Apply animations */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

