/*
* Neno Shifters - Mobile-First Responsive Stylesheet
*/

/* Accessibility styles */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    z-index: 9999;
    transition: top 0.3s;
    font-weight: bold;
    border-radius: 0 0 5px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Screen reader only class */
.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;
}

/* For users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Base styles for mobile devices */
html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
    /* Hide Donate Now button on mobile */
    .header-buttons .btn {
        display: none;
    }

    /* Hide the Neno Shifters text on mobile, keep only the logo */
    .logo a span {
        display: none;
    }
}

body {
    line-height: 1.6;
    color: #333;
    position: relative;
    min-width: 100%;
    -webkit-text-size-adjust: 100%;
}

.container {
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure text is readable on all backgrounds */
.hero-content, .impact-section, .footer {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Improve contrast for hero section on mobile */
@media (max-width: 767.98px) {
    .hero-content {
        color: #333;
        text-shadow: none;
        background-color: rgba(255, 255, 255, 0.9);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .hero-title {
        color: var(--secondary-color);
        font-weight: 700;
    }

    .hero-description {
        color: #333;
        font-weight: 500;
    }
}

/* Header styles for mobile */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.header-wrapper {
    height: 70px;
    width: 100%;
}

.logo img {
    height: 40px;
}

.main-nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    height: calc((100 * var(--vh)) - 70px);
    background-color: var(--white);
    transition: all 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-nav.active {
    left: 0;
}

.main-nav .nav-list {
    flex-direction: column;
    padding: 20px 0;
}

.nav-item {
    margin: 15px 0;
    width: 100%;
    text-align: center;
}

.nav-item a {
    display: block;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.nav-item a:hover,
.nav-item a:focus {
    color: var(--primary-color);
    background-color: rgba(247, 148, 29, 0.1);
}

.mobile-menu-toggle {
    display: block;
    margin-left: 20px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero section for mobile */
.hero-section {
    margin-top: 70px;
    padding: 60px 0;
    height: auto;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-title {
    font-size: 32px;
}

.hero-description {
    font-size: 16px;
}

.hero-buttons {
    flex-direction: column;
    gap: 15px;
}

.hero-buttons .btn {
    width: 100%;
}

.hero-image {
    position: relative;
    width: 100%;
    height: 250px;
    margin-top: 30px;
}

/* Grid layouts for mobile */
.features-grid,
.causes-grid,
.events-grid,
.team-grid,
.partners-grid,
.impact-stats {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* About and impact sections for mobile */
.about-wrapper,
.impact-wrapper,
.mission-action-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
}

.about-image {
    order: -1;
}

/* Make community engagement image full size on mobile */
@media (max-width: 767.98px) {
    .mission-action-image img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}

/* Footer for mobile */
.footer {
    width: 100%;
    box-sizing: border-box;
    padding: 40px 0;
    margin: 0;
    overflow: hidden;
}

.footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.newsletter-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 30px;
}

.newsletter-form {
    width: 100%;
}

/* Form elements for mobile */
.form-group {
    flex-direction: column;
    gap: 15px;
}

.form-group .btn {
    width: 100%;
}

/* Improved form accessibility */
input, textarea, select, button {
    font-size: 16px; /* Prevents iOS zoom on focus */
}

.form-control {
    padding: 12px 15px;
    border-radius: 5px;
    border: 2px solid #ccc;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.2);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Error states for form validation */
.form-control.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* Section styling for mobile */
section {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.section-title {
    font-size: 28px;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

.testimonial-content {
    padding: 30px 20px;
}

/* Image handling for mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.team-member-image {
    height: 250px !important;
}

/* Fix for Mike Mikeas's image on mobile */
.team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.partner-logo {
    height: 120px !important;
}

.partner-logo img {
    max-height: 80px !important;
}

.cause-image {
    height: 180px;
}

.about-image img {
    border-radius: 10px;
}

/* Testimonial elements for mobile */
.author-image {
    width: 50px;
    height: 50px;
}

/* Main cause section for mobile */
.main-cause-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
}

.main-cause-stats {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Contact page for mobile */
.contact-info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.contact-form-wrapper {
    padding: 20px;
}

/* Small Tablets (min-width: 576px) */
@media (min-width: 576px) {
    .container {
        max-width: 100%;
        width: 540px;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 32px;
    }

    .team-member-image {
        height: 300px !important;
    }

    .partner-logo {
        height: 150px !important;
    }
}

/* Medium Tablets (min-width: 768px) */
@media (min-width: 768px) {
    .container {
        max-width: 100%;
        width: 720px;
    }

    .header-wrapper {
        height: 80px;
    }

    .main-nav {
        position: static;
        height: auto;
        width: auto;
        background-color: transparent;
        overflow: visible;
    }

    .main-nav .nav-list {
        flex-direction: row;
        padding: 0;
    }

    .nav-item {
        margin: 0 15px;
        width: auto;
        text-align: left;
    }

    .nav-item a {
        padding: 0;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .hero-section {
        margin-top: 80px;
        padding: 80px 0;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-description {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 20px;
    }

    .hero-buttons .btn {
        width: auto;
    }

    .hero-image {
        height: 350px;
    }

    .features-grid,
    .causes-grid,
    .team-grid,
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .main-cause-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktops (min-width: 992px) */
@media (min-width: 992px) {
    .container {
        max-width: 100%;
        width: 960px;
    }

    .hero-section {
        height: 600px;
        height: calc(100 * var(--vh) - 80px);
        padding: 0;
        width: 100vw;
        max-width: 100%;
    }

    .hero-content {
        padding: 100px 0;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-image {
        position: absolute;
        top: 0;
        right: 0;
        width: 50%;
        height: 100%;
    }

    .features-grid,
    .causes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-wrapper,
    .impact-wrapper,
    .main-cause-wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .about-image {
        order: 0;
    }

    .footer-top {
        grid-template-columns: repeat(4, 1fr);
    }

    .newsletter-wrapper {
        flex-direction: row;
        text-align: left;
    }

    .newsletter-form {
        width: 60%;
    }

    .contact-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-wrapper {
        grid-template-columns: 1fr 2fr;
        gap: 50px;
    }
}

/* Large Desktops (min-width: 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 100%;
        width: 1140px;
    }

    .hero-title {
        font-size: 54px;
    }

    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra Large Desktops (min-width: 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 100%;
        width: 1320px;
    }
}

/* Full-width sections */
.header,
.hero-section,
.features-section,
.about-section,
.causes-section,
.impact-section,
.testimonials-section,
.events-section,
.partners-section,
.newsletter-section,
.footer {
    width: 100vw;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Fix for horizontal scrolling issues */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Fix for iOS Safari viewport height issues */
:root {
    --vh: 1vh;
}

/* Fix for iOS Safari issues */
@supports (-webkit-touch-callout: none) {
    .container {
        width: 100%;
    }

    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Animation styles for reveal effect */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure team images are visible regardless of animation */
.team-member-image {
    opacity: 1 !important;
}

.team-member-image img {
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
