/* Main Stylesheet for TM PUC Website */

:root {
    /* Tech Focus Palette */
    --primary-color: #2563eb;
    /* Vibrant Tech Blue */
    --primary-dark: #1e40af;
    --secondary-color: #f97316;
    /* Energetic Orange */
    --secondary-hover: #ea580c;

    --dark-bg: #0f172a;
    /* Slate 900 */
    --darker-bg: #020617;
    /* Slate 950 */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #f8fafc;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-accent: 0 0 20px rgba(37, 99, 235, 0.15);
    /* Blue glow */

    --radius-md: 0.75rem;
    --radius-lg: 1rem;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f1f5f9;
    /* Slate 100 */
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-bg);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark-bg);
}

.logo-container img {
    height: 50px;
    margin-right: 12px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-bg);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    min-height: 85vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    /* Larger font size */
    color: white;
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Card Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.tech-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tech-card-image {
    height: 200px;
    background-color: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.tech-card-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    z-index: 5;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.tech-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s;
}

.tech-card:hover .tech-card-image img {
    transform: scale(1.05);
}

.tech-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tech-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.badge-diploma {
    color: var(--secondary-color);
}

.badge-certificate {
    color: var(--primary-color);
}

.tech-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tech-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-card-footer {
    padding-top: 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-bg);
}

/* Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--dark-bg);
    color: white;
    border-color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Page Header */
.page-header {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), url('https://images.unsplash.com/photo-1517048676732-d65bc937f952?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    color: #e2e8f0;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    /* Default shadow */
    cursor: default;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    /* Enhanced shadow on hover */
}

/* Footer */
footer {
    background-color: var(--darker-bg);
    color: #e2e8f0;
    padding: 100px 0 40px;
    margin-top: 80px;
    border-top: 4px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-col h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-col p {
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-col ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: start;
    gap: 12px;
    color: #cbd5e1;
}

.footer-col ul li i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 4px;
}

.footer-col a {
    color: #cbd5e1;
    transition: var(--transition);
    display: block;
    margin-bottom: 12px;
}

.footer-col a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.social-link i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile */
@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 40px 24px;
        box-shadow: var(--shadow-lg);
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        gap: 20px;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links li a {
        padding: 15px;
        display: block;
        width: 100%;
        font-size: 1.1rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons .btn {
        margin-left: 0 !important;
        width: 100%;
    }

    .card-grid,
    .grid-2,
    .grid-3,
    .grid-auto {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-container {
        padding: 20px !important;
    }
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.course-modal {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: var(--transition);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-backdrop.active .course-modal {
    transform: scale(1);
}

.modal-header {
    height: 200px;
    position: relative;
    background-color: var(--dark-bg);
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--secondary-color);
    color: white;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

.modal-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 8px;
    display: block;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark-bg);
    line-height: 1.2;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-meta i {
    margin-right: 8px;
    color: var(--primary-color);
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.7;
}

.modal-features {
    background: var(--text-light);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.modal-features h4 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.modal-features ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
}

.modal-features ul li i {
    color: var(--primary-color);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Gallery Extensions */
.gallery-featured {
    margin-bottom: 60px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 500px;
    background: var(--dark-bg);
}

.carousel-container {
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 10;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    z-index: 20;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 30;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 30;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 10px;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Gallery Grid Improvements */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: zoom-in;
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-card-img {
    height: 250px;
    overflow: hidden;
}

.gallery-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s;
}

.gallery-card:hover .gallery-card-img img {
    transform: scale(1.1);
}

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay h4 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
}

.gallery-card-overlay span {
    color: var(--secondary-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 2rem;
}