/* General Styling */

:root {
    --primary-color: #ffc107;
    /* Honey Yellow */
    --secondary-color: #343a40;
    /* Dark Gray */
    --light-color: #f8f9fa;
    --white-color: #fff;
    --success-color: #28a745;
    --font-family: "Poppins", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--secondary-color);
}


/* Utility Classes for SPA */

.hidden {
    display: none !important;
}

.page-view,
.role-view {
    min-height: 70vh;
}


/* Navbar */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.logo i {
    color: var(--primary-color);
}


/* Desktop Nav Links */

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}


/* Mobile Toggle Button (Hidden on desktop) */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0.5rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--secondary-color);
    background: transparent;
    color: var(--secondary-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    background-color: #e0a800;
}

.btn:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
}


/* Hero Section */

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("https://images.unsplash.com/photo-1521791136064-7986c2920216?q=80&w=2069") center/cover no-repeat;
    color: var(--white-color);
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}


/* Hive/Services Section - Standard Layout */

.services-section {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #f2f2f2;
}

.hive-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.hive-cell {
    width: 180px;
    height: 200px;
    background-color: var(--primary-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--secondary-color);
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.hive-cell:hover {
    transform: scale(1.1);
    background-color: #e0a800;
}

.hive-cell span i {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}


/* Small Design Globe Container (BOTTOM ROTATION) */

#design-globe-container {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 200px;
    /* Container height to fit the orbit */
}


/* Central Globe (Honeycomb Image) */

.globe-center-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
    z-index: 2;
}

.honeycomb-globe-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.8), 0 0 30px rgba(255, 193, 7, 0.2);
    }
}


/* ROTATING ORBIT CONTAINER */

.opportunity-orbit-container-small {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Start translation/rotation from center */
    transform: translate(-50%, -50%);
    width: 300px;
    /* Outer diameter of the orbit */
    height: 300px;
    animation: rotateOrbit 25s linear infinite;
    z-index: 1;
}

@keyframes rotateOrbit {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* ORBITING DOMAIN CELLS */

.orbit-item-small {
    position: absolute;
    width: 65px;
    height: 75px;
    background-color: var(--primary-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.6rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Counter-animation is now on the element itself */
    animation: counterRotate 25s linear infinite reverse;
    /* Ensure the cell stays relative to the orbit center */
    top: 50%;
    left: 50%;
    margin-top: -37.5px;
    /* Half of height */
    margin-left: -32.5px;
    /* Half of width */
}

@keyframes counterRotate {
    to {
        transform: rotate(-360deg);
    }
}

.orbit-item-small span {
    transform: rotate(0deg);
    display: block;
    text-align: center;
}

.orbit-item-small span i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}


/* Positioning for each orbit item (150px radius) */

.item-1-small {
    transform: rotate(0deg) translate(150px) rotate(0deg);
}

.item-2-small {
    transform: rotate(60deg) translate(150px) rotate(-60deg);
}

.item-3-small {
    transform: rotate(120deg) translate(150px) rotate(-120deg);
}

.item-4-small {
    transform: rotate(180deg) translate(150px) rotate(-180deg);
}

.item-5-small {
    transform: rotate(240deg) translate(150px) rotate(-240deg);
}

.item-6-small {
    transform: rotate(300deg) translate(150px) rotate(-300deg);
}


/* Blog Section */

.blog-section {
    padding: 4rem 5%;
    text-align: center;
    background-color: var(--light-color);
}

.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.blog-card {
    background: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image i {
    font-size: 4rem;
    color: var(--primary-color);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-content h3 {
    margin-bottom: 0.5rem;
}

.blog-card-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.blog-card-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
}

.blog-card-content a:hover {
    text-decoration: underline;
}


/* Simple Content Page Layout (for About/Contact) */

.simple-content-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 4rem 5%;
    background-color: var(--white-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.info-section h2.view-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-section p {
    margin-bottom: 1rem;
}

.contact-details {
    margin: 2rem 0;
    padding: 1rem;
    border: 1px dashed #ddd;
    border-radius: 5px;
}

.contact-details i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.return-home-container {
    margin-top: 3rem;
    text-align: center;
}


/* Dashboard & Admin Styling */

.dashboard-container,
.admin-container {
    padding: 2rem 5%;
}

.seeker-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.card {
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.cv-status {
    font-size: 0.9rem;
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}


/* Employer View Layout */

.full-width-dashboard {
    padding: 2rem 5%;
}

.employer-management-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 1/3 for stats, 2/3 for job list */
    gap: 2rem;
}


/* NEW: Employer Tabs */

#employer-nav-tabs {
    /* Reuse existing job-filter-nav style for tabs */
    margin-bottom: 2rem;
    padding: 0;
}

.employer-tab-btn {
    flex-grow: 1;
    /* Make tabs span evenly */
    text-align: center;
}

.employer-post-header,
.employer-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}


/* New smaller status element for Post view header */

.employer-post-header .employer-subscription-status-small {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

.employer-post-header .employer-subscription-status-small.premium {
    color: var(--success-color);
}


/* Subscription Card (ONLY FOR MODAL USE NOW) */

.subscription-card {
    text-align: center;
    background: #fff3cd;
    border: 1px solid var(--primary-color);
    padding: 2rem;
    margin-bottom: 0;
    border-radius: 8px;
}

.subscription-card h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.subscription-card p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.post-job-section.full-width-form {
    padding: 0;
    box-shadow: none;
}

.job-step-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.job-step-form h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}


/* Styling for Screening Questions Form */

#screening-questions-container input {
    margin-bottom: 0.5rem;
}


/* End Employer View Layout */


/* Job/Applicant Data Styles */

.job-list {
    max-height: 500px;
    overflow-y: auto;
}

.job-card {
    border: 1px solid #eee;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.job-card h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.job-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.job-card .skills span {
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.3rem;
    display: inline-block;
    margin-top: 5px;
}

.job-card .apply-btn,
.view-applicants-btn {
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.form-actions button {
    width: 48%;
}


/* Job Seeker Sub-Navigation */

.seeker-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

.job-filter-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.job-view-section {
    margin-top: 1.5rem;
}

.job-view-section h3 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 10px;
}


/* Modal Styling */

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    position: relative;
    text-align: center;
}

.modal-content.large-modal {
    max-width: 90%;
    margin: 5% auto;
}


/* Applicant Data Table Styling */

#applicants-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    text-align: left;
    font-size: 0.9rem;
}

#applicants-list th,
#applicants-list td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
}

#applicants-list th {
    background-color: var(--light-color);
    color: var(--secondary-color);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

#applicants-list tr:hover {
    background-color: #f8f8f8;
}

#applicants-list .cv-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}


/* NEW: Seeker/CV View Styling */

.seeker-filter-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.seeker-filter-options select,
.seeker-filter-options input {
    flex: 1 1 200px;
}

#seeker-cv-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}


/* Style for individual CV/Seeker Card */

.seeker-cv-card {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.seeker-cv-card h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.seeker-cv-card .skills span {
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.3rem;
    display: inline-block;
    margin-top: 5px;
}

.seeker-cv-card a.btn {
    margin-top: 1rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}


/* Modal adjustment for the new dedicated Subscription Modal */

#subscriptionModal .modal-content {
    max-width: 500px;
    margin: 10% auto;
}

#employer-subscription-details {
    /* Reuse the subscription-card style but for the modal */
    background: #fff3cd;
    border: 1px solid var(--primary-color);
    padding: 2rem;
    margin-bottom: 0;
    /* Remove margin from original card */
    border-radius: 8px;
}

#employer-subscription-details button {
    margin-top: 1.5rem;
}


/* Admin Page Specifics */

.admin-lists {
    margin-top: 2rem;
}

.admin-lists ul {
    list-style: none;
    padding: 0;
}

.admin-lists li {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.admin-lists li:last-child {
    border-bottom: none;
}

.admin-lists a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.stat-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-card i {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-card h3 {
    margin: 1rem 0 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
}


/* FOOTER STYLING */

footer {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 3rem 5%;
    margin-top: 3rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    flex: 1 1 200px;
}

.footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-col.social i {
    font-size: 1.5rem;
    margin-right: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-col.social i:hover {
    color: var(--primary-color);
}


/* Responsive Design (Finalized) */

@media (max-width: 992px) {
    /* Mobile Menu Toggle */
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: var(--white-color);
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        padding: 0.8rem 1rem;
        border-top: 1px solid var(--light-color);
        margin: 0;
        text-align: left;
    }
    .menu-toggle {
        display: block;
        order: 3;
        /* Move toggle icon to the right side of the navbar */
        margin-left: 1rem;
    }
    .auth-buttons {
        order: 2;
    }
    .logo {
        order: 1;
    }
    .seeker-layout {
        grid-template-columns: 1fr;
    }
    .employer-management-content-grid {
        grid-template-columns: 1fr;
    }
    .job-step-form {
        max-width: 90%;
    }
    #design-globe-container {
        padding: 30px 0;
        height: 180px;
    }
    .globe-center-small {
        width: 80px;
        height: 80px;
    }
    .hive-cell {
        width: 150px;
        height: 170px;
        font-size: 0.9rem;
    }
    .hive-cell span i {
        font-size: 2rem;
    }
    /* Adjust rotation size for smaller screens */
    .opportunity-orbit-container-small {
        width: 280px;
        height: 280px;
    }
    .item-1-small {
        transform: rotate(0deg) translate(140px) rotate(0deg);
    }
    .item-2-small {
        transform: rotate(60deg) translate(140px) rotate(-60deg);
    }
    .item-3-small {
        transform: rotate(120deg) translate(140px) rotate(-120deg);
    }
    .item-4-small {
        transform: rotate(180deg) translate(140px) rotate(-180deg);
    }
    .item-5-small {
        transform: rotate(240deg) translate(140px) rotate(-240deg);
    }
    .item-6-small {
        transform: rotate(300deg) translate(140px) rotate(-300deg);
    }
    /* NEW: Seeker/CV View on mobile */
    .seeker-filter-options {
        flex-direction: column;
    }
    .seeker-filter-options select,
    .seeker-filter-options input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    .auth-buttons {
        margin-left: auto;
        margin-right: 0.5rem;
    }
    .logo {
        margin-right: auto;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-col {
        margin-bottom: 1.5rem;
    }
    .footer-col.social {
        display: flex;
        justify-content: center;
        gap: 1rem;
    }
    .footer-col.social i {
        margin: 0 0.5rem;
    }
    #applicants-list table,
    #applicants-list th,
    #applicants-list td {
        font-size: 0.75rem;
        padding: 8px 5px;
    }
    /* Further adjustment for very small screens */
    .opportunity-orbit-container-small {
        width: 220px;
        height: 220px;
    }
    .item-1-small {
        transform: rotate(0deg) translate(110px) rotate(0deg);
    }
    .item-2-small {
        transform: rotate(60deg) translate(110px) rotate(-60deg);
    }
    .item-3-small {
        transform: rotate(120deg) translate(110px) rotate(-120deg);
    }
    .item-4-small {
        transform: rotate(180deg) translate(110px) rotate(-180deg);
    }
    .item-5-small {
        transform: rotate(240deg) translate(110px) rotate(-240deg);
    }
    .item-6-small {
        transform: rotate(300deg) translate(110px) rotate(-300deg);
    }
}