/* ================= COMPONENTS.CSS ================= */
/* Reusable widgets: Buttons, Cards, Forms, Sliders, Animations */

/* --- HEADER STYLING (The underline effect for H2s) --- */
.container h2 {
    font-size: 2rem;
    color: var(--text-color-light);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.container h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.container h2:hover {
    color: var(--primary);
    cursor: pointer;
}

.container h2:hover::after {
    width: 100px;
    background-color: var(--accent);
}

/* --- FORMS (Used in Login, Contact, Admin) --- */
.container form {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    animation: fadeInScaleUp 0.5s ease-out forwards;
}

.container form div { margin-bottom: 1.5rem; }
.container form label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: var(--dark); }

.container form input[type="text"],
.container form input[type="password"],
.container form input[type="date"],
.container form textarea,
.container form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.container form textarea { min-height: 100px; resize: vertical; }

.container form button[type="submit"] {
    display: block;
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    margin-top: 2rem;
}

.container form button[type="submit"]:hover { background-color: var(--primary-dark); }
.container p[style="color: red;"] { text-align: center; margin-bottom: 1.5rem; font-weight: bold; color: red; }

/* --- BUTTONS --- */
.btn-secondary {
    display: inline-block;
    background-color: var(--gray);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
.btn-secondary:hover { background-color: #5a6268; }

.link-button {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.github-button { background-color: #333; color: #fff; }
.github-button:hover { background-color: #555; }

.pdf-button { background-color: #dc3545; color: #fff; }
.pdf-button:hover { background-color: #c82333; }

.ppt-button { background-color: #ffc107; color: #333; }
.ppt-button:hover { background-color: #e0a800; }

.btn-email { background-color: #7C3AED; color: white; }
.btn-email:hover { background-color: #6D28D9; }

/* Social Buttons (About Page) */
.about-links .btn-social {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 10px 10px 0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    font-size: 1rem;
    line-height: 1;
    border: none;
    text-align: center;
}
.about-links .btn-github { background-color: #333; }
.about-links .btn-linkedin { background-color: #0077B5; }
.about-links .btn-social:hover { opacity: 0.8; }
.about-links .btn-social i { margin-right: 8px; }

/* --- PROJECT CARDS (Index Page) --- */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card img, .project-card iframe, .project-card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: none;
}
.project-card img { display: block; margin-bottom: 10px; }
.project-card .no-image-placeholder {
    display: flex; justify-content: center; align-items: center; width: 100%; height: 200px;
    background-color: #f0f0f0; color: #666; text-align: center; border-radius: 5px; margin-bottom: 10px; border: 1px dashed #ccc;
}

.project-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-card-content h3 { margin-top: 0; margin-bottom: 0.5rem; color: var(--dark); font-size: 1.25rem; }
.project-card-content .project-date { font-size: 0.9rem; color: var(--gray); margin-bottom: 1rem; }
.project-card-content p { color: var(--dark); margin-bottom: 1rem; }
.project-card-content .project-tech, .project-card-content .project-keywords { font-size: 0.9rem; color: var(--primary-dark); margin-top: 0.5rem; }
.project-card-content .project-tech span, .project-card-content .project-keywords span { font-weight: bold; color: var(--dark); }

.project-card-actions { padding: 0 1.5rem 1.5rem; margin-top: auto; display: flex; gap: 0.5rem; }
.project-card-actions .btn-primary, .project-card-actions .btn-secondary { font-size: 0.9rem; padding: 8px 12px; }

/* Card Links */
.project-card-content p a { display: inline; text-decoration: underline; color: #007bff; margin-top: 0; }
.project-card-content h3 a { text-decoration: none; color: inherit; }
.project-card-content h3 a:hover { text-decoration: underline; }

/* --- ABOUT CARDS --- */
.about-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    position: relative;
    overflow: hidden;
}
.about-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background-color: var(--accent); transform: translateY(-100%); transition: transform 0.3s ease-out;
}
.about-card:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15); }
.about-card:hover::before { transform: translateY(0); }
.about-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; transition: color 0.3s ease; }
.about-card:hover i { color: var(--primary-dark); }
.about-card h3 { margin-bottom: 1rem; color: var(--dark); }
.about-card p { color: var(--gray); }

/* --- SKILLS PILLS --- */
.skills { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.skills span { background: rgba(255, 255, 255, 0.2); padding: 0.5rem 1rem; border-radius: 50px; }

/* --- CAROUSEL / SLIDER (Featured Projects) --- */
.featured-projects-section { padding: 4rem 0; background-color: var(--light); text-align: center; }
.carousel-container {
    position: relative; width: 100%; max-width: 1200px; margin: 0 auto;
    overflow: hidden; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.carousel-track { display: flex; transition: transform 0.5s ease-in-out; will-change: transform; }
.carousel-item {
    flex: 0 0 calc(33.333% - 2rem); margin: 0 1rem; box-sizing: border-box;
    display: flex; flex-direction: column; min-height: 400px; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.carousel-item .project-card { height: 100%; }

@media (min-width: 769px) {
    .carousel-item:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); }
}

.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.5);
    color: white; border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: background-color 0.3s ease;
}
.carousel-btn:hover { background-color: rgba(0, 0, 0, 0.7); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.carousel-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot { width: 12px; height: 12px; background-color: rgba(0, 0, 0, 0.3); border-radius: 50%; cursor: pointer; transition: background-color 0.3s ease; }
.dot.active { background-color: var(--primary); }

/* --- RESPONSIVE CAROUSEL --- */
@media (max-width: 768px) {
    .carousel-btn { display: none; }
    .carousel-container { padding: 0 1rem; }
    .carousel-track { margin: 0 -1rem; }
    .carousel-item { flex: 0 0 100% !important; margin: 0 !important; min-height: 350px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); }
    .carousel-item:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
}
@media (max-width: 480px) {
    .carousel-container { padding: 0 0.5rem; }
    .carousel-track { margin: 0 -0.5rem; }
    .carousel-item { min-height: 300px; }
    .carousel-dots { bottom: 10px; }
    .container h2 { font-size: 1.4rem; }
}

/* --- PAGINATION --- */
.pagination { margin-top: 30px; text-align: center; }
.pagination a, .pagination .current-page {
    display: inline-block; padding: 8px 12px; margin: 0 4px; text-decoration: none;
    border: 1px solid var(--primary); border-radius: 4px; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-size: 1rem; min-width: 30px;
}
.pagination a { color: var(--primary); background-color: transparent; cursor: pointer; }
.pagination a:hover { background-color: var(--primary); color: white; border-color: var(--primary-dark); }
.pagination .current-page { background-color: var(--primary); color: white; font-weight: bold; border-color: var(--primary); cursor: default; }

/* --- CERTIFICATIONS SLIDER (SCROLLER) --- */
.certifications-section { width: 100%; margin: 4rem 0; padding: 1rem 0; }
.certifications-section h2 { text-align: center; font-size: 2rem; color: var(--primary); margin-bottom: 2.5rem; position: relative; padding-bottom: 10px; }
.certifications-section h2::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 60px; height: 3px; background-color: var(--primary-dark); border-radius: 5px; }

/* Top Certifications Grid */
.top-certifications-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 0 auto 3rem auto; max-width: 1200px; padding: 0 1rem; }
.top-cert-card {
    display: flex; flex-direction: column; justify-content: center; background: #ffffff;
    border-top: 4px solid var(--accent); border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); border-left: 1px solid var(--border-color);
    border-radius: 10px; padding: 2rem; text-align: left; text-decoration: none; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.top-cert-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(45deg, var(--primary), var(--accent)); opacity: 0; transition: opacity 0.4s ease; z-index: 1; }
.top-cert-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1); border-color: transparent; }
.top-cert-card:hover::after { opacity: 1; }
.top-cert-card > div { position: relative; z-index: 2; transition: color 0.4s ease; }
.top-cert-title { font-size: 1.2rem; font-weight: 600; color: var(--dark); margin-bottom: 0.5rem; }
.top-cert-provider { font-size: 1rem; color: var(--accent); font-weight: 700; }
.top-cert-card:hover .top-cert-title, .top-cert-card:hover .top-cert-provider { color: #ffffff; }

/* Default Scroller */
.scroller { max-width: 90%; margin: auto; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent); mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent); }
.scroller__inner { display: flex; flex-wrap: nowrap; gap: 1.5rem; padding-block: 1rem; list-style: none; margin: 0; padding-left: 0; animation: scroll 14s linear infinite; }
.scroller[data-speed="fast"] .scroller__inner { animation-duration: 7s; }
.scroller:hover .scroller__inner { animation-play-state: paused; }
.scroller__inner li {
    background: linear-gradient(145deg, #f0fff0, #e6fde6); border: 1px solid #d4e9d4; border-top: 5px solid #000;
    border-radius: 8px; padding: 1rem 1.5rem; box-shadow: 0 4px 10px rgba(0,0,0,0.08); flex-shrink: 0; width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; text-align: center;
}
.scroller__inner li:hover { transform: translateY(-6px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); }
.scroller__inner li a { text-decoration: none; color: var(--dark); font-weight: 500; display: block; }
.scroller__inner li .provider { display: block; font-size: 0.9em; color: #555; margin-top: 5px; }

/* Specific ID Certifications Slider (Keep as provided) */
#certifications { margin: 50px 0; overflow: hidden; position: relative; max-width: 100vw; box-sizing: border-box; }
#certifications h2 { margin-bottom: 20px; font-size: 1.8rem; text-align: center; color: var(--dark); }
#certifications .slider-track { display: flex; width: calc( (250px + 20px) * 12 ); animation: slide 30s linear infinite; list-style: none; padding: 0; margin: 0; justify-content: flex-start; }
#certifications .slide-item {
    flex: 0 0 250px; margin-right: 20px; background: linear-gradient(145deg, #f0fff0, #e0ffe0);
    border: 1px solid #ddd; border-radius: 8px; padding: 15px; animation: pulse 2s infinite; text-align: center;
    display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out, background 0.3s ease-out; cursor: pointer;
}
#certifications .slide-item::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background-color: #000;
    border-top-left-radius: 8px; border-top-right-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 1;
}
#certifications .slide-item:hover {
    transform: translateY(-8px) scale(1.02); border-color: #bbb; background: linear-gradient(145deg, #ffffff, #f0fff0);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), inset 0 0 15px rgba(0,0,0,0.15);
}
#certifications .slide-item a { text-decoration: none; color: var(--dark); font-weight: 500; display: block; margin-top: 5px; font-size: 1em; line-height: 1.4; }
#certifications .slide-item a strong { color: var(--primary); font-weight: 700; }
#certifications .slide-item small { display: block; font-size: 0.85em; color: var(--text-muted); margin-top: 5px; }
#certifications .slider-track:hover { animation-play-state: paused; }

/* --- ANIMATIONS (Keyframes) --- */
@keyframes fadeInScaleUp { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes scroll { to { transform: translate(calc(-50% - 0.75rem)); } }
@keyframes slide { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-1 * (250px + 20px) * 12)); } }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7), inset 0 0 8px rgba(0,0,0,0.05); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0), inset 0 0 8px rgba(0,0,0,0.05); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0), inset 0 0 8px rgba(0,0,0,0.05); }
}
@keyframes wobble {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    15% { transform: translateX(-5px) rotate(-1deg); }
    30% { transform: translateX(5px) rotate(1deg); }
    45% { transform: translateX(-3px) rotate(-0.5deg); }
    60% { transform: translateX(3px) rotate(0.5deg); }
    75% { transform: translateX(-1px) rotate(-0.2deg); }
    90% { transform: translateX(1px) rotate(0.2deg); }
}
@keyframes fadeInSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }