/* ================= PAGES.CSS (Corrected) ================= */
/* Specific styling for distinct pages (Hero, About, Project Details, Error) */

/* --- HERO SECTION (Home) --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }

/* --- ABOUT PAGE --- */
.about { padding: 4rem 0; }
.about h2 { text-align: center; font-size: 2rem; margin-bottom: 3rem; color: var(--primary); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.about-introduction { margin-bottom: 30px; }
.about-introduction p { margin-bottom: 15px; line-height: 1.7; color: var(--dark); font-size: 1.1rem; }
.about-introduction p:last-child { margin-bottom: 0; }
.about-introduction p strong { font-weight: bold; color: var(--primary-dark); }
.technology-icons i { display: inline-block; margin: 0 10px; padding: 0; background-color: transparent; border: none; border-radius: 0; color: inherit; font-size: 2.5rem; }

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* --- LOGIN PAGE HEADERS --- */
.container.login-form h2, 
.container h2[class*="form-heading"] {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

/* ================= PROJECT DETAIL (YouTube Style) ================= */

/* --- 1. The Grid Layout --- */
.project-layout {
    display: grid;
    /* Desktop: Main Content (65%) | Sidebar (35%) */
    grid-template-columns: 2fr 1fr; 
    gap: 40px;
    align-items: start; /* Don't stretch height */
    padding-top: 40px;
}

/* --- 2. Left Column (Main Content) --- */
.project-main {
    background: transparent;
}

.youtube-style-video {
    width: 100%;
    /* 16:9 Aspect Ratio hack */
    padding-bottom: 56.25%; 
    position: relative;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    background: #000;
}
.youtube-style-video iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.project-image-container img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.video-placeholder {
    width: 100%;
    height: 400px;
    background: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #777;
    margin-bottom: 20px;
}
.video-placeholder i { font-size: 3rem; margin-bottom: 10px; }

/* Title Area */
.project-info-primary h1 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 5px;
    font-weight: 700;
}

.publish-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Description Box */
.description-box {
    background-color: #f2f2f2;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.description-box h3, .pdf-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.description-box p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

/* PDF Embed in Detail Page */
.pdf-embed-container {
    position: relative; width: 100%; padding-bottom: 75%; height: 0; overflow: hidden; margin-bottom: 25px;
    background-color: var(--light); border: 1px solid var(--border-color); border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 5px 12px rgba(0, 0, 0, 0.15);
}
.pdf-embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* --- 3. Right Column (Sidebar) --- */
.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px; /* Offset from top so it doesn't hit the navbar */
}

.sidebar-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-card h3 {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease;
    color: white;
}
.btn-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.btn-action i { margin-right: 8px; }

/* Button Colors */
.btn-github { background-color: #24292e; }
.btn-ppt { background-color: #D24726; }
.btn-pdf { background-color: #F40F02; }

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background-color: #eef0f3;
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Back Link */
.back-link-container {
    text-align: center;
    margin-top: 10px;
}
.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.back-link:hover { color: var(--primary); }

/* --- 4. Mobile Responsiveness --- */
@media (max-width: 900px) {
    .project-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 20px;
    }

    .project-sidebar {
        position: static;
        order: 2;
    }

    .youtube-style-video {
        border-radius: 8px; 
    }
}

/* --- ERROR PAGE --- */
.error-page {
    padding: 60px 20px; background-color: #fff; border-radius: 10px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px; margin: 80px auto; text-align: center; overflow: hidden;
}
.error-code {
    font-size: 10em; color: #dc3545; margin-bottom: 20px; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: wobble 2s ease-in-out infinite; display: inline-block;
}
.error-message { font-size: 2em; color: #343a40; margin-bottom: 30px; animation: fadeInSlideUp 1s ease-out forwards; animation-delay: 0.5s; opacity: 0; }
.error-page p { font-size: 1.1em; color: #6c757d; line-height: 1.8; margin-bottom: 20px; animation: fadeInSlideUp 1s ease-out forwards; animation-delay: 0.8s; opacity: 0; }
.error-page .button {
    display: inline-block; padding: 12px 25px; margin: 10px; border-radius: 8px; text-decoration: none; font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease; opacity: 1; position: relative; z-index: 10;
}
.error-page .primary-button { background-color: #007bff; color: #fff; }
.error-page .primary-button:hover { background-color: #0056b3; transform: translateY(-2px); color: #fff; }
.error-page .primary-button:active { background-color: #004085; transform: translateY(0); opacity: 1; color: #fff; }
.error-page .primary-button:visited { background-color: #007bff; color: #fff; opacity: 1; }
.error-page .secondary-button { background-color: #6c757d; color: #fff; }
.error-page .secondary-button:hover { background-color: #5a6268; transform: translateY(-2px); color: #fff; }
.error-page .secondary-button:active { background-color: #495057; transform: translateY(0); opacity: 1; color: #fff; }
.error-page .secondary-button:visited { background-color: #6c757d; color: #fff; }