/* Enhanced Responsive Styles */

/* Prevent horizontal scroll on mobile */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
    
    .hero h2 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .location-badge {
        display: none;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .focus-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation Styles */
    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--footer-bg, #0f75bc); /* Same as footer background */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        z-index: 9999;
        animation: slideIn 0.3s ease-out;
        margin: 0;
        border: none;
        overflow-y: auto;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        margin: 15px 0;
        text-align: center;
    }
    
    nav ul li a {
        font-size: 1.2rem;
        padding: 15px 25px;
        display: block;
        border-radius: 8px;
        transition: all 0.3s ease;
        color: white; /* White text for dark footer background */
        text-decoration: none;
        pointer-events: auto !important;
        cursor: pointer;
        text-align: center;
        min-width: 150px;
        border: 2px solid transparent;
        background: transparent;
        margin: 5px 0;
    }
    
    nav ul li a:hover {
        background: rgba(255, 255, 255, 0.15); /* Light hover background */
        color: white; /* White text for dark footer background */
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    nav ul li a:active {
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .mobile-menu {
        display: block;
        cursor: pointer;
        padding: 10px;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu i {
        font-size: 1.5rem;
        transition: transform 0.3s ease;
    }
    
    .mobile-menu.active i {
        transform: rotate(90deg);
    }
    
    /* Add missing CSS animations */
    @keyframes slideDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideIn {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    /* Ensure mobile menu button is always visible */
    .mobile-menu {
        position: relative;
        z-index: 10001;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-menu i {
        color: var(--primary);
        font-size: 1.5rem;
    }
    
    /* Ensure the navigation links work properly */
    nav {
        position: relative;
    }
    
    .hero {
        padding: 100px 0 60px;
        background-attachment: scroll;
    }
    
    .hero h2 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 30px;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix horizontal scroll issues */
    .section {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .hero {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .footer-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .header-container {
        flex-wrap: wrap;
        align-items: center;
        padding: 10px 0;
    }
    
    .logo {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .logo img {
        height: 50px !important;
    }
    
    .mobile-location {
        display: block;
        font-size: 0.9rem;
        padding: 8px 15px;
    }
    
    .team-slider-container {
        padding: 0 0;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    
    /* Ensure no horizontal overflow on mobile */
    .container {
        width: 100%;
        max-width: 100vw;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .about-content {
        gap: 25px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .about-image {
        margin-top: 20px;
    }
    
    .focus-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .focus-card {
        padding: 30px 20px;
    }
    
    .focus-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    /* Stats Section Improvements for 768px */
    .about-text {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    .about-text p {
        width: 100%;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        text-align: justify;
        line-height: 1.7;
        margin-bottom: 20px;
        box-sizing: border-box;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Prevent horizontal scroll for all text elements */
    p, h1, h2, h3, h4, h5, h6, span, div {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }
    
    .about-image {
        margin-top: 20px !important;
        margin-top: 0;
        width: 100%;
    }
    
    .about-stats {
        flex-direction: row;
        gap: 15px;
        margin-top: 25px;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        background: rgba(15, 117, 188, 0.05);
        border-radius: 15px;
        border: 1px solid rgba(15, 117, 188, 0.1);
        overflow-x: auto;
    }
    
    .stat {
        text-align: center;
        padding: 12px 4px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        width: calc(33.33% - 10px);
        flex: 0 0 calc(33.33% - 10px);
        min-width: 110px;
        height: 115px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s ease;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .stat-number {
        font-size: 2.2rem;
        font-weight: 700;
        color: var(--primary);
        display: block;
        margin-bottom: 8px;
        white-space: nowrap;
        line-height: 1;
    }
    
    .stat-text {
        color: var(--text-light);
        font-size: 0.78rem;
        font-weight: 500;
        line-height: 1.15;
        text-align: center;
        padding: 0 3px;
        width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .stat:hover {
        transform: translateY(-3px);
    }
    
    .stat-number {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--primary);
        display: block;
        margin-bottom: 8px;
    }
    
    .stat-text {
        color: var(--text-light);
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.3;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-btns {
        gap: 12px;
    }
    
    .btn {
        max-width: 250px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .about-content {
        gap: 20px;
    }
    
    .about-text h3 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .about-text p {
        font-size: 1rem;
        margin-bottom: 20px;
        word-wrap: break-word;
        hyphens: auto;
        text-align: justify;
        line-height: 1.7;
    }
    
    .about-text {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    .about-text p {
        width: 100%;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        text-align: justify;
        line-height: 1.7;
        margin-bottom: 20px;
        box-sizing: border-box;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Prevent horizontal scroll for all text elements */
    p, h1, h2, h3, h4, h5, h6, span, div {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }
    
    .about-image {
        margin-top: 20px !important;
        margin-top: 0;
        width: 100%;
    }
    
    .about-stats {
        flex-direction: row;
        gap: 15px;
        margin-top: 25px;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        background: rgba(15, 117, 188, 0.05);
        border-radius: 15px;
        border: 1px solid rgba(15, 117, 188, 0.1);
        overflow-x: auto;
    }
    
    .stat {
        text-align: center;
        padding: 10px 4px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        width: calc(33.33% - 8px);
        flex: 0 0 calc(33.33% - 8px);
        min-width: 95px;
        height: 105px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s ease;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .stat-number {
        font-size: 2rem;
        font-weight: 700;
        color: var(--primary);
        display: block;
        margin-bottom: 6px;
        white-space: nowrap;
        line-height: 1;
    }
    
    .stat-text {
        color: var(--text-light);
        font-size: 0.75rem;
        font-weight: 500;
        line-height: 1.15;
        text-align: center;
        padding: 0 3px;
        width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .stat:hover {
        transform: translateY(-3px);
    }
    
    .stat-number {
        font-size: 2.2rem;
        font-weight: 700;
        color: var(--primary);
        display: block;
        margin-bottom: 8px;
    }
    
    .stat-text {
        color: var(--text-light);
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.3;
    }
    
    .logo img {
        height: 40px !important;
    }
    
    .focus-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .focus-card {
        padding: 25px 15px;
    }
    
    .focus-card h3 {
        font-size: 1.3rem;
    }
    
    .focus-card p {
        font-size: 0.95rem;
    }
    
    .focus-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .team-card {
        height: 480px;
        margin: 5px;
    }
    
    .team-image {
        height: 200px;
    }
    
    .team-info {
        padding: 15px;
    }
    
    .team-info h3 {
        font-size: 1.2rem;
    }
    
    .team-position {
        font-size: 0.9rem;
    }
    
    .team-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .footer-col h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .footer-col p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 15px;
        text-align: justify;
    }
    
    .contact-container {
        gap: 25px;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .contact-form {
        padding: 25px 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    .form-control {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    .map-section {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .map-container iframe {
        height: 160px;
    }
    
    .contact-item {
        margin-bottom: 20px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-right: 15px;
    }
    
    .contact-text h4 {
        font-size: 1rem;
    }
    
    .contact-text p,
    .contact-text a {
        font-size: 0.9rem;
    }
    
    /* Additional Stats improvements for very small screens */
    .about-stats {
        gap: 10px;
        padding: 15px;
    }
    
    .stat {
        width: calc(33.33% - 6px);
        flex: 0 0 calc(33.33% - 6px);
        min-width: 85px;
        height: 95px;
        padding: 10px 4px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .stat-number {
        font-size: 1.8rem;
        margin-bottom: 5px;
        white-space: nowrap;
        line-height: 1;
    }
    
    .stat-text {
        font-size: 0.75rem;
        text-align: center;
        padding: 0 3px;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* Navigation Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

/* Enhanced mobile menu styles */
@media (max-width: 768px) {
    .mobile-menu.active {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
    }
    
    .mobile-menu.active i {
        color: #f8f9fa;
    }
    
    nav ul {
        backdrop-filter: blur(10px);
        background: var(--footer-bg, #0f75bc); /* Same as footer background */
    }
    
    nav ul li {
        opacity: 0;
        animation: fadeInUp 0.3s ease forwards;
    }
    
    nav ul li:nth-child(1) { animation-delay: 0.1s; }
    nav ul li:nth-child(2) { animation-delay: 0.15s; }
    nav ul li:nth-child(3) { animation-delay: 0.2s; }
    nav ul li:nth-child(4) { animation-delay: 0.25s; }
    nav ul li:nth-child(5) { animation-delay: 0.3s; }
    nav ul li:nth-child(6) { animation-delay: 0.35s; }
    nav ul li:nth-child(7) { animation-delay: 0.4s; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Contact Form Mobile Styles */
@media (max-width: 768px) {
    .contact-form {
        background: white;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(15, 117, 188, 0.1);
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .error-message {
        font-size: 0.8rem;
    }
    
    .character-count {
        font-size: 0.8rem;
    }
    
    .checkbox-label {
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .checkmark {
        width: 18px;
        height: 18px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 25px;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .success-message,
    .error-message {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .success-message h4,
    .error-message h4 {
        font-size: 1rem;
    }
    
    .success-message p,
    .error-message p {
        font-size: 0.9rem;
    }
    
    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(15, 117, 188, 0.1);
        transform: translateY(-1px);
    }
    
    .btn {
        position: relative;
        overflow: hidden;
        padding: 12px 20px;
    }
    
    .btn.loading .btn-text {
        display: none;
    }
    
    .btn.loading .btn-loading {
        display: inline;
    }
}

@media (max-width: 576px) {
    .contact-form {
        padding: 20px 15px;
    }
    
    .form-row {
        gap: 15px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .form-group textarea {
        min-height: 80px;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
    }
    
    .checkmark {
        width: 16px;
        height: 16px;
    }
    
    .form-actions .btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gallery Responsive Styles */
@media (max-width: 992px) {
    .gallery-info {
        padding: 20px;
    }
    
    .gallery-info h3 {
        font-size: 1.2rem;
    }
    
    .gallery-description {
        font-size: 0.9rem;
    }
    
    .gallery-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
.gallery-card {
        margin: 10px 5px;
    }
    
    .gallery-info {
        padding: 18px;
    }
    
    .gallery-info h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .gallery-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .gallery-category {
        font-size: 0.8rem;
        padding: 5px 12px;
        margin-bottom: 12px;
    }
    
    .gallery-overlay .gallery-content h3 {
        font-size: 1.3rem;
    }
    
    .gallery-overlay .gallery-content p {
        font-size: 0.9rem;
    }
    
    .gallery-overlay .gallery-date {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .gallery-card {
        margin: 10px 0;
    }
    
    .gallery-info {
        padding: 15px;
    }
    
    .gallery-info h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .gallery-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .gallery-image {
        height: 180px;
    }
    
    .gallery-category {
        font-size: 0.75rem;
        padding: 4px 10px;
        margin-bottom: 10px;
    }
    
    .gallery-overlay {
        padding: 15px;
    }
    
    .gallery-overlay .gallery-content h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .gallery-overlay .gallery-content p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .gallery-overlay .gallery-date {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .gallery-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 15px;
        right: 15px;
    }
}

/* Gallery Modal Responsive */
@media (max-width: 992px) {
    .gallery-modal-content {
        max-width: 95vw;
        margin: 10px;
    }
    
    .gallery-modal-body {
        flex-direction: column;
        max-height: 85vh;
    }
    
    .gallery-modal-image {
        flex: none;
        height: 50vh;
    }
    
    .gallery-modal-info {
        flex: none;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-modal-header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .gallery-navigation {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .gallery-modal-body {
        max-height: 80vh;
    }
    
    .gallery-modal-image {
        height: 40vh;
    }
    
    .gallery-modal-info {
        padding: 15px;
    }
    
    .gallery-modal-info h4 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .gallery-modal-info p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .gallery-modal-content {
        max-width: 98vw;
        margin: 5px;
        border-radius: 10px;
    }
    
    .gallery-modal-header {
        padding: 12px 15px;
    }
    
    .close-gallery-modal {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .gallery-modal-body {
        max-height: 75vh;
    }
    
    .gallery-modal-image {
        height: 35vh;
    }
    
    .gallery-modal-info {
        padding: 12px;
    }
    
    .gallery-modal-info h4 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .gallery-modal-info p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .gallery-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    #galleryCounter {
        font-size: 1rem;
    }
}

/* Mobile location badge */
.mobile-location {
    display: none;
}

@media (max-width: 768px) {
    .mobile-location {
        display: block;
    }
}

/* Swiper responsive adjustments */
@media (max-width: 768px) {
    .team-swiper {
        padding: 10px 0 40px;
    }
    
    .team-card {
        margin: 0px;
        height: 520px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .team-image {
        height: 220px;
        width: 220px;
        align-self: center;
        border-radius: 50%;
        overflow: hidden;
        border: 4px solid var(--primary);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .team-info {
        padding: 18px 15px;
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Animation for stats counter */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animated {
    animation: countUp 1s ease-out;
}