/*
  File: style.css
  Description: Contains custom styles for the Northwood Academy Profile page,
               replacing Tailwind CSS utility classes.
*/

/* --- General Body and Font Styles --- */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Container --- */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* --- Navigation --- */
.top-nav {
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo img {
    height: 2.5rem;
    width: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: none; /* Hidden on mobile */
    gap: 1rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex; /* Visible on desktop */
    }
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link:hover {
    color: #111827;
}

.nav-link.active {
    color: #2563eb;
}

.language-dropdown, .user-profile {
    position: relative;
}

.language-btn, .user-profile-btn {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background: none;
    border: none;
    cursor: pointer;
}

.language-btn:hover, .user-profile-btn:hover {
    color: #111827;
}

.dropdown-icon {
    height: 1.25rem;
    width: 1.25rem;
    margin-left: 0.25rem;
}

.user-profile-btn {
    border-radius: 9999px;
}

.user-profile-btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6;
}

.user-avatar {
    height: 2.25rem;
    width: 2.25rem;
    border-radius: 9999px;
}

/* --- Page Layout --- */
.page-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Breadcrumb and Search --- */
.breadcrumb-search-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    gap: 0.5rem;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #111827;
}

.breadcrumb .current-page {
    color: #111827;
}

.search-toggle-btn {
    padding: 0.5rem;
    border-radius: 9999px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-toggle-btn:hover {
    background-color: #e5e7eb;
}

.search-toggle-btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6;
}

.search-icon {
    height: 1.25rem;
    width: 1.25rem;
    color: #6b7280;
}

.search-field-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}

@media (min-width: 640px) {
    .search-input {
        width: 50%;
    }
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    padding: 0.25rem;
    color: #6b7280;
    border-radius: 9999px;
    border: none;
    background: none;
    cursor: pointer;
}

@media (min-width: 640px) {
    .clear-search-btn {
        right: 25%;
        margin-right: 0.5rem;
    }
}

.clear-search-btn:hover {
    background-color: #e5e7eb;
}

.clear-icon {
    height: 1rem;
    width: 1rem;
}

/* --- Header --- */
.page-header {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
}

.header-subtitle {
    margin-top: 0.25rem;
    font-size: 1rem;
    color: #4b5563;
}

.header-specialization {
    margin-top: 1rem;
    color: #374151;
    font-weight: 500;
}

.header-stats {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #374151;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.stat-item span {
    font-weight: 400;
}

.rating-value {
    color: #f59e0b;
    font-weight: 700;
}

.star-icon {
    color: #facc15;
    font-size: 1.125rem;
}

.header-logo {
    width: 9rem;
    height: 9rem;
    flex-shrink: 0;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Main Content --- */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 2fr 1fr;
    }
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Card --- */
.card {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border: 1px solid #e5e7eb;
}

.card-header {
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.contact-info {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #4b5563;
}

.info-label {
    font-weight: 600;
    color: #111827;
    margin-right: 0.5rem;
}

.info-link {
    color: #4f46e5;
    text-decoration: none;
}

.info-link:hover {
    text-decoration: underline;
}

.card-text {
    margin-top: 1rem;
    color: #4b5563;
    line-height: 1.625;
}

/* --- Ratings Section --- */
.ratings-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

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

.overall-rating-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-summary {
    text-align: center;
}

.large-rating-value {
    font-size: 3.75rem;
    font-weight: 700;
    color: #f59e0b;
}

.star-rating {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    gap: 0.25rem;
    color: #facc15;
}

.star-rating .star-empty {
    color: #d1d5db;
}

.reviews-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 0.25rem;
}

.detailed-ratings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #374151;
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Reviews Section --- */
.reviews-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-name {
    font-size: 1.17em !important;
    font-weight: 600;
    color: #111827;
}

.review-text {
    margin-top: 0.5rem;
    color: #374151;
}

.review-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.all-reviews-link-container {
    margin-top: 1.5rem;
    text-align: center;
}

.all-reviews-btn {
    color: #4f46e5;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
}

.all-reviews-btn:hover {
    text-decoration: underline;
}

/* --- Similar Schools --- */
.similar-schools-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.similar-school-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: background-color 0.3s;
}

.similar-school-item:hover {
    background-color: #f9fafb;
}

.school-logo-container {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
}

.school-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.school-name {
    font-weight: 600;
    font-size: 1.17em !important;
    color: #111827;
}

.school-rating {
    font-size: 0.875rem;
    color: #4b5563;
}

/* --- Footer --- */
.footer {
    background-color: #ffffff;
    margin-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.footer-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-about {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    height: 2.5rem;
}

.footer-text {
    color: #6b7280;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    font-size: 1rem;
    color: #6b7280;
    text-decoration: none;
}

.footer-links a:hover {
    color: #111827;
}

.footer-bottom {
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .social-links {
        order: 2;
    }
}

.social-links a {
    color: #9ca3af;
}

.social-links a:hover {
    color: #6b7280;
}

.social-icon {
    height: 1.5rem;
    width: 1.5rem;
}

.copyright {
    margin-top: 2rem;
    font-size: 1rem;
    color: #9ca3af;
}

@media (min-width: 768px) {
    .copyright {
        margin-top: 0;
        order: 1;
    }
}

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    margin: 1rem;
    max-width: 42rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.modal-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
}

.close-modal-btn {
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
}

.close-modal-btn:hover {
    color: #1f2937;
}

.close-icon {
    height: 1.5rem;
    width: 1.5rem;
}

.modal-body {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


/* --- Utility Classes --- */
.hidden {
    display: none !important;
}

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