/* ========================================
   Haryana Prashikshan Premium Theme
   ======================================== */

/* CSS Variables */
:root {
    --haryana-navy: #123B63;
    --haryana-blue: #1769AA;
    --haryana-teal: #008C95;
    --haryana-gold: #F4B942;
    --haryana-light-blue: #EAF5FF;
    --haryana-bg: #F6F8FC;
    --haryana-white: #FFFFFF;
    --haryana-text: #172B4D;
    --haryana-text-muted: #667085;
    --haryana-border: #E5E7EB;
    --haryana-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --haryana-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --haryana-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --haryana-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --container-width: 1280px;
}

/* Global Styles */
body {
    background: var(--haryana-bg);
    color: var(--haryana-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--haryana-navy);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--haryana-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--haryana-teal);
}

/* Buttons */
button,
.btn-primary,
.button-primary {
    background: var(--haryana-navy);
    border: 2px solid var(--haryana-navy);
    color: var(--haryana-white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

button:hover,
.btn-primary:hover,
.button-primary:hover {
    background: var(--haryana-teal);
    border-color: var(--haryana-teal);
    transform: translateY(-2px);
    box-shadow: var(--haryana-shadow-md);
}

.btn-primary-large {
    background: var(--haryana-navy);
    color: var(--haryana-white);
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid var(--haryana-navy);
}

.btn-primary-large:hover {
    background: var(--haryana-teal);
    border-color: var(--haryana-teal);
    transform: translateY(-3px);
    box-shadow: var(--haryana-shadow-lg);
    color: var(--haryana-white);
}

/* ========================================
   Hero Section
   ======================================== */
.haryana-hero {
    background: linear-gradient(135deg, #123B63 0%, #1769AA 50%, #008C95 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.haryana-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 1;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--haryana-white);
    margin: 0 0 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 20px;
    font-weight: 500;
}

.hero-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-image {
    flex: 0 0 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.haryana-hero-logo {
    width: 100%;
    max-width: 450px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Hero Search */
.hero-search {
    margin-bottom: 30px;
}

.course-search-form {
    width: 100%;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--haryana-white);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--haryana-shadow-xl);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    margin: 0 12px;
    color: var(--haryana-text-muted);
    flex-shrink: 0;
}

.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 12px 8px;
    background: transparent;
    color: var(--haryana-text);
}

.hero-search-input::placeholder {
    color: var(--haryana-text-muted);
}

.hero-search-button {
    background: var(--haryana-navy);
    color: var(--haryana-white);
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hero-search-button:hover {
    background: var(--haryana-teal);
    transform: scale(1.05);
}

.hero-cta {
    margin-top: 20px;
}

/* ========================================
   Section Styles
   ======================================== */
.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--haryana-navy);
    margin: 0 0 16px;
    text-align: center;
}

.section-subtitle {
    font-size: 20px;
    color: var(--haryana-text-muted);
    margin: 0 0 50px;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header .section-title {
    text-align: left;
    margin: 0;
}

.view-all-link {
    font-size: 18px;
    font-weight: 600;
    color: var(--haryana-navy);
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: var(--haryana-teal);
    transform: translateX(5px);
}

/* ========================================
   Learning Categories
   ======================================== */
.learning-categories {
    padding: 80px 0;
    background: var(--haryana-white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--haryana-white);
    border: 2px solid var(--haryana-border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--haryana-shadow-xl);
    border-color: var(--haryana-navy);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.category-icon.education {
    background: linear-gradient(135deg, var(--haryana-navy), var(--haryana-blue));
    color: var(--haryana-white);
}

.category-icon.technology {
    background: linear-gradient(135deg, var(--haryana-blue), var(--haryana-teal));
    color: var(--haryana-white);
}

.category-icon.leadership {
    background: linear-gradient(135deg, var(--haryana-teal), var(--haryana-gold));
    color: var(--haryana-white);
}

.category-icon.administration {
    background: linear-gradient(135deg, var(--haryana-gold), var(--haryana-navy));
    color: var(--haryana-white);
}

.category-icon.digital {
    background: linear-gradient(135deg, var(--haryana-navy), var(--haryana-teal));
    color: var(--haryana-white);
}

.category-icon.professional {
    background: linear-gradient(135deg, var(--haryana-blue), var(--haryana-gold));
    color: var(--haryana-white);
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--haryana-navy);
    margin: 0 0 12px;
}

.category-card p {
    font-size: 16px;
    color: var(--haryana-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   Featured Courses
   ======================================== */
.featured-courses {
    padding: 80px 0;
    background: var(--haryana-bg);
}

.courses-grid {
    display: block;
}

.courses-listing {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.courses-listing-item {
    list-style: none;
}

/* Premium Course Cards */
.haryana-course-card {
    background: var(--haryana-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--haryana-shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.haryana-course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--haryana-shadow-xl);
}

.course-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.course-card-link:hover {
    color: inherit;
}

.course-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--haryana-bg);
}

.course-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.haryana-course-card:hover .course-image {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 59, 99, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.haryana-course-card:hover .course-overlay {
    opacity: 1;
}

.view-course-btn {
    color: var(--haryana-white);
    font-size: 18px;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid var(--haryana-white);
    border-radius: 8px;
    background: transparent;
    transition: all 0.3s ease;
}

.haryana-course-card:hover .view-course-btn {
    background: var(--haryana-white);
    color: var(--haryana-navy);
}

.course-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-organization {
    margin-bottom: 12px;
}

.org-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--haryana-navy), var(--haryana-blue));
    color: var(--haryana-white);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--haryana-navy);
    margin: 0 0 12px;
    line-height: 1.4;
    min-height: 56px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-code {
    font-size: 14px;
    color: var(--haryana-text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--haryana-text-muted);
    font-size: 14px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--haryana-border);
}

.calendar-icon {
    color: var(--haryana-teal);
}

/* ========================================
   Learning for Haryana (Mission Section)
   ======================================== */
.haryana-mission {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(18, 59, 99, 0.05), rgba(23, 105, 170, 0.05));
}

.mission-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.mission-image {
    flex: 0 0 400px;
}

.mission-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.mission-text {
    flex: 1;
}

.mission-text h2 {
    font-size: 42px;
    font-weight: 700;
    color: var(--haryana-navy);
    margin: 0 0 24px;
}

.mission-description {
    font-size: 18px;
    color: var(--haryana-text);
    line-height: 1.8;
    margin: 0 0 32px;
}

.mission-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-item svg {
    color: var(--haryana-teal);
    flex-shrink: 0;
}

.feature-item span {
    font-size: 16px;
    font-weight: 600;
    color: var(--haryana-navy);
}

/* ========================================
   Learning at Your Fingertips
   ======================================== */
.fingertips-section {
    padding: 80px 0;
    background: var(--haryana-white);
}

.fingertips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.fingertips-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: 16px;
    background: var(--haryana-bg);
    transition: all 0.3s ease;
}

.fingertips-card:hover {
    background: var(--haryana-white);
    box-shadow: var(--haryana-shadow-lg);
    transform: translateY(-5px);
}

.fingertips-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--haryana-navy), var(--haryana-blue));
    color: var(--haryana-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.fingertips-card:hover .fingertips-icon {
    transform: scale(1.1) rotate(-5deg);
}

.fingertips-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--haryana-navy);
    margin: 0 0 12px;
}

.fingertips-card p {
    font-size: 16px;
    color: var(--haryana-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   Courses Page Styles
   ======================================== */
.haryana-courses-page {
    background: var(--haryana-bg);
}

.courses-page-header {
    background: linear-gradient(135deg, #123B63 0%, #1769AA 100%);
    padding: 60px 0;
    text-align: center;
    color: var(--haryana-white);
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--haryana-white);
    margin: 0 0 16px;
}

.page-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.haryana-search-bar {
    background: var(--haryana-white);
    padding: 30px 0;
    box-shadow: var(--haryana-shadow-sm);
}

.wrapper-search-context {
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: var(--haryana-bg);
    border: 2px solid var(--haryana-border);
    border-radius: 12px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: var(--haryana-navy);
    box-shadow: var(--haryana-shadow-md);
}

.discovery-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px;
    background: transparent;
}

.search-submit-btn {
    background: var(--haryana-navy);
    color: var(--haryana-white);
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit-btn:hover {
    background: var(--haryana-teal);
}

.filters-wrapper {
    display: flex;
    justify-content: center;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--haryana-white);
    border: 2px solid var(--haryana-border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    border-color: var(--haryana-navy);
    color: var(--haryana-navy);
}

.courses-container {
    padding: 40px 0 80px;
}

.haryana-courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ========================================
   Header Logo Styles
   ======================================== */
.logo-image {
    max-height: 50px;
    width: auto;
    height: auto;
}

header .logo img,
header .logo-image {
    max-height: 50px;
    width: auto;
}

/* ========================================
   Footer Styles
   ======================================== */
footer {
    background: var(--haryana-navy);
    color: rgba(255, 255, 255, 0.9);
    padding: 50px 0 30px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--haryana-white);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 24px;
    }

    .hero-image {
        flex: 0 0 auto;
    }

    .haryana-hero-logo {
        max-width: 350px;
    }

    .mission-content {
        flex-direction: column;
        text-align: center;
    }

    .mission-image {
        flex: 0 0 auto;
        max-width: 350px;
    }

    .mission-features {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .section-title {
        font-size: 36px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .haryana-hero {
        padding: 50px 0 60px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .haryana-hero-logo {
        max-width: 280px;
    }

    .search-wrapper {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .hero-search-input {
        width: 100%;
        text-align: center;
    }

    .hero-search-button {
        width: 100%;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .section-header .section-title {
        text-align: center;
    }

    .learning-categories,
    .featured-courses,
    .haryana-mission,
    .fingertips-section {
        padding: 50px 0;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .courses-listing,
    .haryana-courses-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mission-text h2 {
        font-size: 28px;
    }

    .mission-description {
        font-size: 16px;
    }

    .mission-image {
        max-width: 280px;
    }

    .fingertips-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-title {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .search-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .discovery-input {
        width: 100%;
    }

    .search-submit-btn {
        width: 100%;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .haryana-hero-logo {
        max-width: 240px;
    }

    .section-title {
        font-size: 24px;
    }

    .btn-primary-large {
        padding: 14px 24px;
        font-size: 16px;
    }

    .category-card {
        padding: 24px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-card h3 {
        font-size: 20px;
    }

    .mission-text h2 {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .haryana-hero,
    .learning-categories,
    .fingertips-section {
        page-break-inside: avoid;
    }

    .haryana-course-card {
        box-shadow: none;
        border: 1px solid var(--haryana-border);
    }
}

/* Accessibility */
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--haryana-teal);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .haryana-course-card {
        border: 2px solid var(--haryana-navy);
    }

    .category-card {
        border: 2px solid var(--haryana-navy);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .haryana-hero-logo {
        animation: none;
    }
}
