/* Institutional Page Styles */
.institutional-container {
    width: 75%;
    margin: 8rem auto 3rem;
    padding: 0 1rem;
}

.institutional-header {
    text-align: center;
    margin-bottom: 3rem;
}

.institutional-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    position: relative;
    display: inline-block;
}

.institutional-header h1:after {
    content: '';
    position: absolute;
    width: 70%;
    height: 4px;
    bottom: -10px;
    left: 15%;
    background: var(--primary-color);
    border-radius: 2px;
}

.institutional-header p {
    font-size: 1.1rem;
    color: var(--text-dark-low);
    max-width: 600px;
    margin: 0 auto;
}

/* Tab Styles */
.tab-wrapper {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.tab-menu {
    display: flex;
    justify-content: center;
    background: var(--card-bg);
    padding: 1rem;
    border-bottom: 1px solid var(--bg-color);
    position: relative;
    gap: 1rem;
    flex-wrap: nowrap; /* Prevent wrapping by default */
    text-align: center;
}

.tab-menu::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background-color: var(--bg-color);
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark-low);
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    overflow: hidden;
    min-width: 160px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.tab-btn i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    color: var(--text-dark-low);
}

.tab-btn:hover {
    color: var(--text-dark);
    background: var(--bg-color);
    transform: translateY(-2px);
}

.tab-btn:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--text-dark);
    background: var(--bg-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.tab-btn.active::before {
    width: 50%;
}

.tab-btn.active i {
    color: var(--primary-color);
    transform: scale(1.2);
}

.tab-btn span {
    position: relative;
}

.tab-btn.active span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-content-wrapper {
    padding: 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive tab adjustments */
@media (max-width: 768px) {
    .tab-menu {
        padding: 0.8rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0.6rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .tab-menu::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .tab-btn {
        padding: 0.7rem 1.2rem;
        min-width: auto;
        flex: 0 0 auto;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .tab-btn i {
        font-size: 1.1rem;
    }
    
    .tab-content-wrapper {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .tab-btn {
        padding: 0.6rem 1rem;
    }
    
    .tab-btn i {
        font-size: 1rem;
    }
}

/* About Tab Styles */
.about-section {
    max-width: 1000px;
    margin: 0 auto;
}

.about-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
}

.about-illustration {
    flex: 1;
    max-width: 450px;
}

.about-illustration img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.about-hero-content {
    flex: 1;
}

.about-hero-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-hero-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark-low);
}

.about-values {
    margin-bottom: 3rem;
}

.about-values h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.value-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.value-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.value-icon i {
    font-size: 1.5rem;
    color: var(--primary-color-dark);
}

.value-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.value-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark-low);
}

.about-story {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
}

.about-story h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-dark);
}

.about-story p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-dark-low);
}

.about-story p:last-child {
    margin-bottom: 0;
}

/* Policies Tab Styles */
.policies-section {
    max-width: 900px;
    margin: 0 auto;
}

.policies-header {
    text-align: center;
    margin-bottom: 2rem;
}

.policies-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.policies-header p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark-low);
    max-width: 700px;
    margin: 0 auto;
}

.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    border: 1px solid var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-header span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.accordion-header i {
    font-size: 0.9rem;
    color: var(--text-dark-low);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header {
    background: var(--primary-color-low);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.accordion-item.active .accordion-content {
    padding: 1.5rem;
    max-height: 500px;
}

.accordion-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark-low);
    margin-bottom: 1rem;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

/* Contact Tab Styles */
.contact-section {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-header p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark-low);
    max-width: 700px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--primary-color-dark);
}

.contact-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.contact-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark-low);
    margin-bottom: 0.4rem;
}

.contact-form-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.contact-form {
    max-width: 100%; /* Changed from 700px to ensure it fits on all screens */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%; /* Ensure full width */
    box-sizing: border-box;
}

.form-group:nth-child(3),
.form-group:nth-child(4),
.form-group:nth-child(5) {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--bg-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 232, 0, 0.2);
}

.submit-btn {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Help Tab Styles */
.help-section {
    max-width: 1000px;
    margin: 0 auto;
}

.help-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.help-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.help-header p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark-low);
    max-width: 700px;
    margin: 0 auto;
}

.help-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.help-category {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.help-category:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.category-icon i {
    font-size: 1.3rem;
    color: var(--primary-color-dark);
}

.help-category h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.help-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark-low);
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--text-dark);
    transform: translateX(5px);
}

.help-link i {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.help-faq {
    margin-bottom: 3rem;
}

.help-faq h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.help-support {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.help-support h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.support-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.support-option {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 1.5rem;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.support-option:hover {
    transform: translateY(-5px);
}

.support-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.support-icon i {
    font-size: 1.5rem;
    color: var(--primary-color-dark);
}

.support-option h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.support-option p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark-low);
    margin-bottom: 1.5rem;
}

.support-button {
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    border-radius: 6px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.support-button:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

/* Help Tab FAQ-Only Styles */
.help-faq-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.faq-category {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.faq-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--bg-color);
}

.faq-category h3 i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 50%;
}

.help-faq-categories .accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.help-faq-categories .accordion-item {
    border: 1px solid var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .faq-category {
        padding: 1.2rem;
    }
    
    .faq-category h3 {
        font-size: 1.1rem;
    }
    
    .help-faq-categories .accordion-container {
        gap: 0.6rem;
    }
}

/* Help section modifications */
.help-section {
    max-width: 90%;
    margin: 0 auto;
}

/* Improve readability in accordion content */
.accordion-content ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.accordion-content ul li {
    margin-bottom: 0.4rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .institutional-container {
        width: 85%;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
}

@media (max-width: 992px) {
    .institutional-container {
        width: 90%;
    }

    .tab-menu {
        flex-wrap: wrap;
    }

    .tab-btn {
        margin: 0.3rem;
    }

    .about-hero {
        flex-direction: column;
        text-align: center;
    }

    .about-illustration {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .contact-form {
        gap: 1rem;
    }
    
    .help-categories {
        grid-template-columns: 1fr;
    }
    
    .support-options {
        flex-direction: column;
        align-items: center;
    }
    
    .support-option {
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .institutional-container {
        width: 95%;
        margin-top: 7rem;
    }

    .institutional-header h1 {
        font-size: 2rem;
    }

    .tab-content-wrapper {
        padding: 1.5rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Override span for all form groups on mobile */
    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .form-group:nth-child(5) {
        grid-column: 1;
    }
    
    .contact-form-container {
        padding: 1.2rem;
    }
    
    .help-section {
        padding: 0.5rem;
    }
    
    .help-category {
        padding: 1.2rem;
    }

    .help-support {
        padding: 1.5rem;
    }
}

/* Make sure tabs are always centered on mobile */
@media (max-width: 576px) {
    .institutional-container {
        width: calc(100% - 1rem);
        padding: 0 0.5rem;
        margin-top: 6rem;
    }

    .institutional-header h1 {
        font-size: 1.8rem;
    }

    .tab-menu {
        justify-content: center;
        padding: 0.3rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .tab-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        scroll-snap-align: start;
        flex: 0 0 auto;
    }

    .tab-content-wrapper {
        padding: 1rem;
    }

    .value-icon,
    .contact-icon {
        width: 50px;
        height: 50px;
    }

    .contact-form-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    .tab-menu {
        justify-content: center !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.5rem 0;
    }
}
