/* Custom CSS Variables */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #28a745; /* Green for highlights */
    --background-light: #f8f9fa; /* Light gray */
    --background-dark: #343a40; /* Dark gray */
    --text-color-dark: #212529; /* Dark text */
    --text-color-light: #ffffff; /* Light text */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    --border-radius-sm: 5px;
    --border-radius-md: 10px;
    --box-shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --box-shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
body {
    margin: 0;
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.75em; }
h4 { font-size: 1.3em; color: var(--text-color-dark); } /* Style for new H4s */

p {
    margin-bottom: 1em;
    text-align: justify; /* Applied justify here */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3; /* A darker shade of blue */
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul li {
    text-align: justify; /* Applied justify to list items as well */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-hero {
    background-color: var(--accent-color);
    color: var(--text-color-light);
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
}

.btn-hero:hover {
    background-color: #218838;
    transform: translateY(-3px);
}

.btn.large {
    font-size: 1.2em;
    padding: 15px 35px;
}

.icon-large {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.icon-medium {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.link-btn { /* Style for links styled as buttons within text */
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    margin-top: 10px;
    display: inline-flex; /* Align icon better */
    align-items: center;
    gap: 5px;
}
.link-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}


/* Main Header (Sticky) */
#main-header {
    background-color: var(--background-dark);
    color: var(--text-color-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--box-shadow-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-logo-img {
    height: 40px; /* Adjust as needed */
    filter: invert(1); /* Example: If logo is dark, make it light */
}

#conference-title { /* Updated from #spa */
    font-size: 1.8em;
    margin: 0;
    color: var(--text-color-light);
}

.main-navbar ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-navbar .nav-link { /* General styling for all nav links */
    color: var(--text-color-light);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.3s ease;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--primary-color);
}

.main-navbar .btn-primary {
    padding: 8px 20px;
    margin-left: 10px;
}

/* Desktop Menu Toggle (initially hidden) */
.desktop-menu-toggle {
    display: none; /* Hide desktop hamburger on desktop view */
}

/* Mobile Menu Toggle (initially hidden, shown in media query) */
.mobile-menu-toggle {
    display: none; /* Hide mobile three-dot on desktop view */
    background: none;
    border: none;
    color: var(--text-color-light);
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
}


/* Dropdown Menu Styles - CORRECTED */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex; /* To align text and icon */
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%; /* Position below the parent link */
    left: 0;
    background-color: var(--background-dark); /* Same as header */
    min-width: 220px; /* Adjust width as needed */
    box-shadow: var(--box-shadow-light);
    border-radius: var(--border-radius-sm);
    padding: 10px 0;
    z-index: 1001; /* Above header if needed */
    flex-direction: column; /* Stack items vertically */
    gap: 0; /* No gap between dropdown items */

    /* Default hidden state for desktop - using opacity/visibility for transition */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); /* Slight offset for animation */
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Show on hover for desktop */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%; /* Full width for dropdown items */
}

.dropdown-menu .nav-link {
    padding: 10px 20px; /* Padding for dropdown items */
    color: var(--text-color-light);
    display: block; /* Make the whole area clickable */
    border-radius: 0; /* No rounded corners for inner items */
}

.dropdown-menu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Lighter hover for dropdown items */
}
.dropdown-icon {
    font-size: 0.8em; /* Smaller arrow icon */
    transition: transform 0.3s ease;
}
.dropdown:hover .dropdown-icon {
    transform: rotate(180deg); /* Rotate arrow on hover */
}


/* Partners Section (Logos) */
.partners-section {
    background-color: var(--text-color-light);
    padding: 25px 0;
    border-bottom: 1px solid #e0e0e0;
}

.partners-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary-color);
    font-size: 1.5em;
}

.logo-container {
    display: flex;
    justify-content:space-evenly ;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center ;
}

.partner-logo {
    height: 90px;
 /* Example: Make logos grayscale by default */
    /* Make them slightly transparent */
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.partner-logo:hover {
     /* Full color on hover */
   
    transform: scale(1.25);
}


/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    background: url('telecommunications-signal-transmitter-radio-tower-from-lines-illustration-design-vector.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center; /* Keep hero section centered */
    color: var(--text-color-light);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 900px; text-align: center;
    animation: fadeIn 1s ease-out forwards;
}

.hero-tagline {
    font-size: 1.1em;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8); text-align: center;
}

.hero-title {
    font-size: 2.8em;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-color-light);
}

.hero-conference-name {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--text-color-light);
    font-weight: 700;
}

.hero-conference-name .year {
    color: var(--primary-color);
}

.hero-dates {text-align: center;
    font-size: 1.3em;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Content Sections General Styling */
.content-section {
    padding: 80px 0;
    background-color: var(--background-light);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-section:nth-of-type(even) { /* This selector might need adjustment if order changes often */
    background-color: var(--text-color-light);
}

.content-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.8em;
    position: relative;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.hidden-section {
    display: none !important;
}

/* About SPACE Section */
.about-space-section p {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify; /* Keep specific justify here for clarity */
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
}

/* Important Dates Section */
.important-dates {
    background-color: var(--background-light);
}

.dates-cards {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    flex-direction: row;
    text-align: center;
}

.date-card {
    background-color: var(--text-color-light);
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items : center;
}

.date-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-medium);
}

.date-card h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.date-card p {
    font-size: 1.1em;
    color: #666;
    font-weight: 600;
    text-align: center; /* Keep date cards centered text */
}

/* Tracks Section */
#tracks-section-wrapper {
    background-color: var(--text-color-light);
}

.tracks-intro {
    text-align: justify; /* Keep specific justify here for clarity */
    margin-bottom: 40px;
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.track-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.track-card {
    background-color: var(--background-light);
    padding: 35px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.track-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-medium);
}

.track-card h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 15px;
    margin-top: 0;
    text-align: left; /* Ensure track titles are left-aligned */
}

.track-card p {
    font-size: 1em;
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
    text-align: justify; /* Keep specific justify here for clarity */
}

.track-card ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 20px;
}

.track-card li {
    font-size: 0.95em;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.5;
    text-align: justify; /* Keep specific justify here for clarity */
}

/* About College Section */
.about-college {
    background-color: var(--background-light);
}

.about-college h2 {
    font-size: 2.8em;
    margin-bottom: 25px;
}

.about-college h2 a {
    color: inherit;
    transition: color 0.3s;
}

.about-college h2 a:hover {
    color: #0056b3;
}

.about-college p {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify; /* Keep specific justify here for clarity */
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
}

/* Placeholder Sections */
.placeholder-section {
    padding: 100px 20px;
    text-align: center;
    background-color: #e9ecef;
    border-top: 1px solid #dee2e6;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.placeholder-section h2 {
    color: var(--secondary-color);
}
.placeholder-section h2::after {
    background-color: var(--secondary-color);
}


/* Styles for new detailed content sections (Article Submission, Enrollment, Review Policy, etc.) */
#article-submission-section,
#conference-enrollment-section,
#review-policy-section,
#publication-section,
#speakers-section,
#payment { /* Added #payment here */
    padding: 60px 0; /* Slightly less padding than main sections */
    background-color: var(--text-color-light); /* White background */
}
#article-submission-section:nth-of-type(even),
#conference-enrollment-section:nth-of-type(even),
#review-policy-section:nth-of-type(even),
#publication-section:nth-of-type(even),
#speakers-section:nth-of-type(even),
#payment:nth-of-type(even) { /* Added #payment here */
     background-color: var(--background-light); /* Alternate light gray for long sections */
}

/* General styling for list content within detailed sections */
#article-submission-section ul,
#conference-enrollment-section ul,
#review-policy-section ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#article-submission-section ol { /* For ordered lists */
    list-style: decimal;
    padding-left: 25px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#article-submission-section li,
#conference-enrollment-section li,
#review-policy-section li {
    margin-bottom: 10px;
    font-size: 1em;
    color: #444;
    text-align: justify; /* Keep specific justify here for clarity */
}

#article-submission-section p,
#conference-enrollment-section p,
#review-policy-section p,
#publication-section p,
#payment p { /* Added #payment here */
    max-width: 900px;
    margin: 0 auto 20px auto;
    font-size: 1.05em;
    line-height: 1.7;
    color: #555;
    text-align: justify; /* Keep specific justify here for clarity */
}

.template-links { /* For download buttons */
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.template-links .btn {
    width: auto; /* Reset width to auto for desktop, will be 100% on mobile */
    max-width: 250px; /* Give a max-width for desktop buttons */
}

.steps-list { /* For enrollment steps */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 30px auto;
}
.step-item {
    background-color: var(--background-light);
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
    border-left: 5px solid var(--primary-color);
}
.step-item h4 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: left; /* Ensure step titles are left-aligned */
}
.step-item p { /* Added this for step item paragraphs */
    text-align: left; /* Ensure step item paragraphs are left-aligned, not justified if single line */
}
.step-item ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 0;
    max-width: none; /* Override parent max-width */
}
.step-item li {
    font-size: 0.95em;
    text-align: justify; /* Ensure step item list items are justified */
}


/* Footer */
footer {
    background-color: var(--background-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 15px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 15px;
    }
    .main-navbar ul {
        gap: 20px;
    }
    .hero-title {
        font-size: 2.5em;
    }
    .hero-conference-name {
        font-size: 3em;
    }
    .content-section h2 {
        font-size: 2.2em;
    }
    .dates-cards, .track-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    #main-header {
        padding: 10px 0;
    }
    .header-content {
        flex-wrap: wrap;
        justify-content: space-between; /* Adjusted to separate logo and toggle buttons */
    }
    .logo-main {
        width: auto;
        margin-bottom: 0;
    }
    /* Hide the desktop navigation and show the mobile toggle */
    .main-navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-dark);
        box-shadow: var(--box-shadow-light);
        z-index: 990;
        padding-bottom: 15px;
        max-height: 0; /* Start hidden with 0 height */
        overflow: hidden; /* Hide overflowing content */
        transition: max-height 0.4s ease-in-out; /* Smooth transition for height */
        flex-direction: column; /* Ensure items stack vertically even when hidden */
        display: flex; /* Always keep as flex for transition, but max-height hides it */
    }
    .main-navbar.active {
        max-height: 400px; /* Adjust as needed for your menu content */
    }
    .main-navbar ul {
        flex-direction: column;
        gap: 0; /* Remove gap for mobile */
        width: 100%;
    }
    .main-navbar li {
        width: 100%;
        text-align: center;
    }
    .main-navbar .nav-link,
    .main-navbar .btn-primary {
        display: block;
        padding: 12px 20px; /* Adjust padding for mobile links */
        border-radius: 0;
        margin-left: 0; /* Remove margin */
        width: 100%;
    }
    .main-navbar .nav-link:hover,
    .main-navbar .nav-link.active {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
    }

    /* Dropdown specific for mobile - CORRECTED */
    .dropdown {
        position: static; /* No longer absolutely positioned relative to header */
    }
    .dropdown-menu {
        position: static;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        box-shadow: none;
        padding: 0;
        border-radius: 0;

        display: flex; /* Ensure it's flex for vertical stacking */
        flex-direction: column;
        opacity: 1; /* Keep visible, hide with max-height */
        visibility: visible; /* Keep visible, hide with max-height */
        transform: translateY(0);

        overflow: hidden;
        max-height: 0; /* Start with no height for accordion effect */
        transition: max-height 0.3s ease-out; /* Smooth transition */
    }
    .dropdown.active .dropdown-menu {
        max-height: 300px; /* Arbitrary max height for transition (adjust if content exceeds this) */
    }
    .dropdown-menu .nav-link {
        padding-left: 40px; /* Indent dropdown items */
        background-color: rgba(0, 0, 0, 0.2);
    }
    .dropdown-icon {
        transform: rotate(0deg); /* Reset rotation */
    }
    .dropdown.active .dropdown-icon {
        transform: rotate(180deg); /* Rotate when active */
    }

    /* Display the mobile-specific toggle and hide the desktop-specific one */
    .desktop-menu-toggle {
        display: none;
    }
    .mobile-menu-toggle {
        display: block; /* Show three-dot menu on mobile */
    }

    .hero-section {
        height: 500px;
    }
    .hero-title {
        font-size: 2em;
    }
    .hero-conference-name {
        font-size: 2.8em;
    }
    .hero-dates {
        font-size: 1.1em;
    }
    .content-section {
        padding: 60px 0;
    }
    .content-section h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .track-card {
        padding: 25px;
    }
    .about-space-section p, .about-college p, .tracks-intro,
    #article-submission-section p, #conference-enrollment-section p, #review-policy-section p, #publication-section p, #payment p {
        font-size: 1em;
        padding: 0 10px; /* Add some horizontal padding for paragraphs */
        text-align: justify; /* Ensure mobile paragraphs are justified */
    }
    .about-space-section ul, #article-submission-section ul, #conference-enrollment-section ul, #review-policy-section ul, #payment ul {
        padding-left: 20px;
        margin-left: 10px; /* Adjust list margin on mobile */
        margin-right: 10px;
    }
    .template-links {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    .template-links .btn {
        width: 100%;
        max-width: none; /* Remove max-width on mobile */
    }
    .steps-list {
        padding: 0 10px;
    }
    .placeholder-section {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    #conference-title { /* Updated from #spa */
        font-size: 1.5em;
    }
    .main-logo-img {
        height: 30px;
    }
    .hero-section {
        height: 400px;
    }
    .hero-title {
        font-size: 1.5em;
    }
    .hero-conference-name {
        font-size: 2.2em;
    }
    .hero-dates {
        font-size: 1em;
    }
    .btn-hero {
        padding: 10px 25px;
        font-size: 1em;
    }
    .content-section h2 {
        font-size: 1.8em;
    }
    .date-card {
        padding: 20px;
    }
    .icon-large {
        font-size: 2.5em;
    }
    .track-card h3 {
        font-size: 1.4em;
    }
    .partner-logo {
        height: 45px;
    }
    footer .container {
        gap: 10px;
    }
    .footer-links a {
        margin: 0 10px;
        font-size: 0.85em;
    }
    .dropdown.active .dropdown-menu {
        max-height: 250px; /* Adjust for smaller screens */
    }
    #conference-title { /* Updated from #spa */
        width: 150px; /* Specific width for mobile view if needed for logo */
    }
}