/* Unified Color Palette */
:root {
  --primary: #005a4c;
  --primary-dark: #00382c;
  --primary-darker: #00251a;
  --accent: #26bfa6;
  --accent-dark: #00897b;
  --accent-light: #e6f4f1;
  --background: #0b3829;
  --background-light: #f4f7f6;
  --background-lighter: #f9f9f9;
  --card-bg: #fff;
  --card-bg-alt: #e6f4f1;
  --text: #222;
  --text-light: #fff;
  --text-muted: #a5d6a7;
  --heading: #003366;
  --border: #ccc;
}

/* Reset some basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background-color: var(--primary);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo img {
  height: 60px;
  background: var(--card-bg);
  padding: 5px; /* Add spacing around logo */
  border-radius: 10px; /* Rounded corners for aesthetics */
  box-shadow: 0 2px 8px rgba(0,0,0,0.10); /* Subtle shadow for separation */
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  padding: 10px 5px;
}

nav ul li a:hover {
  color: var(--accent);
}

/* Dropdown menu */
.dropdown-menu, .sub-menu {
  display: none;
  position: absolute;
  background-color: var(--card-bg);
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  list-style: none; /* Ensure list style is reset */
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.sub-dropdown {
  position: absolute;
  background-color: var(--card-bg);
}
.sub-dropdown:hover .sub-menu {
  display: block;
  left: 100%;
  top: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dropdown-menu a, .sub-menu a {
  color: var(--text);
  padding: 10px 15px;
  display: block;
  text-decoration: none;
}

.dropdown-menu a:hover, .sub-menu a:hover {
  background-color: var(--accent-light);
}

/* Main content wrapper to push footer down */
.main-content-wrapper {
  flex-grow: 1;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0,90,76,0.85), rgba(0,90,76,0.85)), url('images/hero-bg.jpg') center/cover no-repeat;
  color: var(--text-light);
  padding: 6rem 2rem;
  text-align: center;
}

.hero-text h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  background-color: var(--accent);
  color: var(--text-light);
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

.cta-btn:hover {
  background-color: var(--accent-dark);
}

/* Why Choose Us */
.why-choose {
  background-color: var(--card-bg);
  padding: 4rem 2rem;
  text-align: center;
}

.why-choose h2 {
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.feature {
  background-color: var(--accent-light);
  padding: 2rem;
  border-radius: 10px;
  width: 280px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-8px);
}

.feature i {
  color: var(--accent);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feature p {
  color: var(--text);
  font-size: 1rem;
}

/* Testimonials */
.testimonials {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 4rem 2rem;
  text-align: center;
}

.testimonials h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.testimonial-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.testimonial {
  background-color: var(--accent-dark);
  padding: 2rem;
  border-radius: 10px;
  width: 300px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  font-style: italic;
  position: relative;
}

.testimonial h4 {
  margin-top: 1.5rem;
  font-weight: 600;
  font-style: normal;
  text-align: right;
}

/* Footer */
footer {
  background-color: var(--primary-darker);
  color: var(--accent);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .features, .testimonial-cards {
    flex-direction: column;
    align-items: center;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  .hero-text h1 {
    font-size: 2.25rem;
  }
  
  .hero-text p {
    font-size: 1.1rem;
  }
}

/* CONTACT SECTION */
.contact {
  background-color: var(--accent-light);
  padding: 60px 20px;
  text-align: center;
}

.contact h2 {
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 40px;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.contact-info {
  max-width: 300px;
  text-align: left;
  font-size: 16px;
}

.contact-info p {
  margin: 10px 0;
  color: var(--text);
}

.contact-info i {
  color: var(--accent);
  margin-right: 10px;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-form {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.contact-form button {
  background-color: var(--accent);
  color: var(--text-light);
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.contact-form button:hover {
  background-color: var(--accent-dark);
}

.contact-options {
  background-color: var(--background-light);
  padding: 50px 20px;
  text-align: center;
}

.contact-options h2 {
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 30px;
}

.options-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.contact-option {
  background-color: var(--card-bg);
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 12px;
  padding: 25px 35px;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: 0.3s;
  min-width: 200px;
}

.contact-option i {
  font-size: 32px;
  margin-bottom: 10px;
}

.contact-option:hover {
  background-color: var(--accent);
  color: var(--text-light);
}

.map-section {
  background-color: var(--accent-light);
  padding: 40px 20px;
  text-align: center;
}

.map-address p {
  color: var(--text);
  font-size: 16px;
  margin-top: 15px;
}

/* CONTACT SECTION */
.contact {
  padding: 60px 20px;
  background-color: #f0f8ff;
  text-align: center;
}

.contact h2 {
  font-size: 28px;
  color: #003b5c;
  margin-bottom: 40px;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.contact-info {
  max-width: 300px;
  text-align: left;
  font-size: 16px;
}

.contact-info p {
  margin: 10px 0;
  color: #333;
}

.contact-info i {
  color: #007e87;
  margin-right: 10px;
}

.contact-info a {
  text-decoration: none;
  color: #007e87;
}

.contact-form {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.contact-form button {
  padding: 12px;
  background-color: #007e87;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.contact-form button:hover {
  background-color: #005e65;
}

.contact-options {
  padding: 50px 20px;
  text-align: center;
  background-color: #f5f9fa;
}

.contact-options h2 {
  font-size: 28px;
  color: #004d40;
  margin-bottom: 30px;
}

.options-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.contact-option {
  background-color: #ffffff;
  border: 2px solid #007e87;
  color: #007e87;
  border-radius: 12px;
  padding: 25px 35px;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: 0.3s;
  min-width: 200px;
}

.contact-option i {
  font-size: 32px;
  margin-bottom: 10px;
}

.contact-option:hover {
  background-color: #007e87;
  color: white;
}

.map-section {
  padding: 40px 20px;
  background-color: #eef7f8;
  text-align: center;
}

.map-address p {
  font-size: 16px;
  color: #333;
  margin-top: 15px;
}

main h1 {
  color: #ffffff;
  background: linear-gradient(rgba(0,90,76,0.85), rgba(0,90,76,0.85));
  margin-bottom: 6rem 2rem;
  text-align: center;
  background-color: #0a0606;
}

/* University Section */

.university-section {
  text-align: center;
}
.university-section h1 {
  font-size: 2.5rem;
  margin-bottom: 0px;
}
.university-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  background-color: var(--background-light);
}
.university-card {
  background-color: var(--accent-light);
  border-radius: 10px;
  padding: 20px;
  width: 220px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s;
}
.university-card:hover {
  transform: translateY(-5px);
}
.university-card img {
  max-width: 100px;
  height: auto;
  margin-bottom: 15px;
}
.university-card p {
  color: var(--primary);
  font-weight: bold;
  margin: 0;
}
.university-card a {
  text-decoration: none;
  display: block;
  color: inherit;
}

/* Styling links */
.dropdown-menu a, .sub-menu a {
  color: var(--text);
  padding: 10px 15px;
  display: block;
  text-decoration: none;
}

.dropdown-menu a:hover, .sub-menu a:hover {
  background-color: var(--accent-light);
}

/* === Karabük University Page Styling === */

.university-page {
  background-color: var(--background-lighter);
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.university-page h1 {
  color: var(--background-lighter);
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  border-radius: 10px;
}

.uni-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.uni-logo img {
  max-width: 220px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.description p {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: justify;
  margin-bottom: 2rem;
}

.programs {
  background-color: #e6f0ff; /* Consider adding to palette if used elsewhere */
  border-left: 5px solid var(--heading);
  padding: 1.5rem;
  border-radius: 10px;
}

.programs h2 {
  color: var(--heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.programs ul {
  list-style-type: circle;
  padding-left: 1.5rem;
}

.programs li {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* new edit here for the json file */
/* --- Explore Page Specific Styles --- */

.explore-page {
    background-color: var(--background-lighter);
    max-width: 100%; /* Max width for content */
    margin: 0 auto; /* Center content */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.explore-page h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.8rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2.5rem;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 3rem;
    padding: 20px;
    background-color: var(--accent-light);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    align-items: flex-end; /* Align inputs/selects at the bottom */
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px; /* Minimum width for each filter group */
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.95rem;
}

#searchUniversities,
.filter-group select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text);
    background-color: var(--card-bg);
    width: 100%; /* Take full width of its container */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    appearance: none; /* Remove default select arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23005a4c%22%20d%3D%22M287%2069.9a14.2%2014.2%200%2000-20.1%200L146.2%20190.6%2025.5%2069.9a14.2%2014.2%200%2000-20.1%200%2014.2%2014.2%200%20000%2020.1l130.8%20130.8a14.2%2014.2%200%200020.1%200L287%2090a14.2%2014.2%200%20000-20.1z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
}

#searchUniversities {
    flex-grow: 2; /* Allow search bar to be wider */
    min-width: 250px;
}

/* University Grid for Explore Page */
.university-grid-explore {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px;
    padding: 20px 0;
}

.university-card-explore {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make cards same height */
}

.university-card-explore:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.university-card-link {
    text-decoration: none;
    color: inherit; /* Inherit text color from parent */
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-grow: 1; /* Allow link content to grow within the card */
}

.uni-logo-wrapper {
    text-align: center;
    margin-bottom: 15px;
}

.university-card-explore img {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    background-color: var(--background-lighter);
    padding: 5px;
}

.university-card-explore h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-align: center;
}

.university-card-explore .uni-info {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 5px;
}

.university-card-explore .uni-description {
    font-size: 0.9rem;
    color: var(--text-muted); /* More subtle for description */
    margin-top: 15px;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows description to push "View Details" down */
    line-height: 1.5;
}

.university-card-explore .read-more-btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 600;
    text-align: center;
    align-self: flex-end; /* Align button to the bottom right */
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.university-card-explore .read-more-btn:hover {
    background-color: var(--accent-dark);
}

.loading-message, .no-results-message, .error-message {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text);
    padding: 40px;
    grid-column: 1 / -1; /* Make it span all columns in the grid */
}

.error-message {
    color: #d32f2f; /* Red for errors */
    font-weight: bold;
}

/* Responsive adjustments for Explore Page */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch; /* Stretch items to full width */
    }

    .filter-group {
        min-width: unset; /* Remove min-width on small screens */
        width: 100%; /* Take full width */
    }

    #searchUniversities {
        min-width: unset;
        width: 100%;
    }

    .explore-page h1 {
        font-size: 2rem;
    }

    .university-grid-explore {
        grid-template-columns: 1fr; /* Single column layout on small screens */
    }
}
/* --- Explore Page University Card Program List Styling --- */

.uni-programs-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.uni-programs-list h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-align: center;
}

.program-item-explore {
    background-color: var(--background-lighter); /* Lighter background for program details */
    border: 1px solid var(--accent-light);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.program-title-explore {
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem; /* Smaller font for program titles */
    font-weight: 600;
    color: var(--text);
    background-color: var(--accent-light);
    transition: background-color 0.2s ease;
}

.program-title-explore:hover {
    background-color: var(--accent);
    color: var(--text-light);
}

.program-title-explore .toggle-icon-explore {
    font-size: 0.8rem; /* Smaller icon */
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.program-details-explore {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 18px; /* Initial padding */
}

.program-details-explore.active {
    max-height: 300px; /* Adjust as needed */
    padding: 15px 18px;
}

.program-details-explore p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.program-details-explore ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 0;
}

.program-details-explore li {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.program-details-explore li strong {
    color: var(--primary-dark);
}

/* Ensure the main link doesn't cover the program items */
.university-card-link-main {
    text-decoration: none;
    color: inherit;
    display: block; /* Important: Make it a block to not stretch over programs */
    padding-bottom: 15px; /* Add some space below the description before programs list */
}

/* Remove 'View Details' button, as clicking the card's main area or programs provides details */
.university-card-explore .read-more-btn {
    display: none; /* Hide the old "View Details" button */
}

/* Specific styling for university card elements not within the main link */
.university-card-explore h3,
.university-card-explore .uni-info,
.university-card-explore .uni-description {
    text-align: left; /* Adjust alignment if desired */
    margin-left: 0;
    margin-right: 0;
}