/* Responsive Design - Mobile First Approach */

/* Base styles are mobile-first (320px+) */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .section-container {
        padding: 0 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .business-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
    /* Enhanced Navigation adjustments */
    .nav-container {
        padding: 0 1.5rem !important;
        height: 70px !important;
    }

    .nav-logo a {
        font-size: 1.3em !important;
    }

    .nav-logo span {
        width: 28px !important;
        height: 28px !important;
        font-size: 1rem !important;
    }

    .nav-menu {
        position: fixed !important;
        left: -100% !important;
        top: 70px !important;
        flex-direction: column !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        width: 100% !important;
        text-align: center !important;
        transition: 0.3s !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
        padding: 2rem 0 !important;
        border-top: 1px solid rgba(0,0,0,0.1) !important;
        gap: 0 !important;
    }

    .nav-menu.active {
        left: 0 !important;
    }

    .nav-menu .nav-link {
        padding: 1rem !important;
        display: block !important;
        font-size: 1.1rem !important;
        color: #4A5568 !important;
        margin: 0.5rem 0 !important;
    }

    .nav-menu a[href="#contact"] {
        margin: 1rem 2rem !important;
        display: inline-block !important;
    }

    .nav-toggle {
        display: flex !important;
    }

    /* Enhanced Hero Section Mobile */
    .hero {
        padding-top: 70px !important;
        min-height: 100vh !important;
    }

    .hero-container {
        padding: 0 1.5rem !important;
    }

    .hero-main h1 {
        font-size: clamp(2.2rem, 8vw, 3.5rem) !important;
    }

    .hero-main h2 {
        font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
    }

    .hero-main p {
        font-size: clamp(1rem, 3vw, 1.2rem) !important;
    }

    .hero-main a {
        padding: 0.875rem 2rem !important;
        font-size: 1rem !important;
    }

    .hero-main div[style*="display:flex;align-items:center;gap:2rem"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .hero-main div[style*="display:flex;align-items:center;gap:2rem"] > div:not([style*="width:1px"]) {
        display: flex !important;
        gap: 2rem !important;
    }

    .hero-main div[style*="width:1px;height:40px"] {
        display: none !important;
    }

    /* Enhanced Vision and Mission Responsive Styles */
    /* Vision Section Mobile */
    #vision {
        padding: 4rem 0 !important;
    }

    #vision .section-header {
        margin-bottom: 3rem !important;
    }

    #vision .section-header h2 {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    #vision div[style*="background:linear-gradient(135deg,#667eea"] {
        padding: 2.5rem 1.5rem !important;
        margin-bottom: 3rem !important;
    }

    #vision div[style*="display:grid;grid-template-columns:1.5fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    #vision div[style*="display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    #vision div[style*="padding:3rem"] {
        padding: 2rem !important;
    }

    /* Mission Section Mobile */
    #mission {
        padding: 4rem 0 !important;
    }

    #mission .section-header {
        margin-bottom: 3rem !important;
    }

    #mission .section-header h2 {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    #mission div[style*="display:grid;grid-template-columns:1.5fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    #mission div[style*="padding:3rem 3rem 3rem 4rem"] {
        padding: 2rem !important;
    }

    #mission div[style*="top:-2rem"] {
        top: -1.5rem !important;
        left: 2rem !important;
        width: 60px !important;
        height: 60px !important;
        font-size: 1.2rem !important;
    }

    #mission h4 {
        font-size: 1.3rem !important;
    }

    #mission div[style*="margin-top:2rem"] {
        margin-top: 1.5rem !important;
    }

    /* Team Section Mobile */
    #team {
        padding: 4rem 0 !important;
    }

    #team .section-header {
        margin-bottom: 3rem !important;
    }

    #team .section-header h2 {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    #team div[style*="padding:4rem 3rem"] {
        padding: 2.5rem 2rem !important;
    }

    #team .team-story {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    #team div[style*="padding:3rem"] {
        padding: 2rem !important;
    }

    #team div[style*="width:80px;height:80px"] {
        width: 60px !important;
        height: 60px !important;
    }

    #team h4 {
        font-size: 1.3rem !important;
    }

    /* Trust Section Mobile */
    #trust {
        padding: 4rem 0 !important;
    }

    #trust .section-header {
        margin-bottom: 3rem !important;
    }

    #trust .section-header h2 {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    #trust div[style*="padding:4rem 3rem"] {
        padding: 2.5rem 2rem !important;
    }

    #trust .trust-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    #trust div[style*="padding:3rem"] {
        padding: 2rem !important;
    }

    #trust div[style*="width:80px;height:80px"] {
        width: 60px !important;
        height: 60px !important;
    }

    #trust h4 {
        font-size: 1.3rem !important;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero section */
    .hero-content {
        min-height: 50vh;
        text-align: center;
        padding: 2rem 0;
    }

    /* Products Section */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Vision Section */
    .vision-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .vision-image {
        order: -1;
    }

    .vision-pillars {
        margin-top: 1rem;
    }

    /* Mission Section */
    .mission-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mission-image {
        order: -1;
    }

    /* Team Section */
    .team-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .team-image {
        order: -1;
    }

    /* Trust Section */
    .trust-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .trust-image {
        order: -1;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    .hero-founder {
        order: -1;
    }

    .founder-image {
        max-width: 300px;
    }

    /* Section spacing */
    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    /* Business grid */
    .business-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Vision section */
    .vision-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .vision-image {
        order: -1;
    }

    .vision-img {
        max-height: 300px;
    }

    /* Mission section */
    .mission-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .mission-image {
        order: -1;
    }

    .mission-img {
        max-height: 300px;
    }

    /* Culture stats */
    .culture-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .culture-values {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Impact section */
    .impact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .impact-visual {
        order: -1;
    }

    .impact-graphic {
        width: 300px;
        height: 250px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

/* Small devices (portrait phones, up to 576px) */
@media (max-width: 576px) {
    /* Typography adjustments */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Layout adjustments */
    .section-container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    /* Hero */
    .hero {
        min-height: 90vh;
    }

    .hero-content {
        gap: 2rem;
    }

    .founder-image {
        max-width: 250px;
    }

    .founder-note blockquote {
        font-size: 1.1rem;
    }

    /* Business cards */
    .business-card {
        padding: 1.5rem;
    }

    .business-image {
        height: 150px;
    }

    /* Stats */
    .culture-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Value cards */
    .value-card {
        padding: 1.5rem;
    }

    /* Vision and impact graphics */
    .vision-graphic,
    .impact-graphic {
        width: 250px;
        height: 200px;
    }

    /* Impact items */
    .impact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-section {
        margin-bottom: 2rem;
    }

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

/* Extra small devices (very small phones, up to 360px) */
@media (max-width: 360px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .section-container {
        padding: 0 0.75rem;
    }

    .nav-container {
        padding: 0 0.75rem;
    }

    .business-card,
    .stat-item,
    .value-card {
        padding: 1rem;
    }

    .founder-image {
        max-width: 200px;
    }

    .vision-graphic,
    .impact-graphic {
        width: 200px;
        height: 150px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .section-container {
        padding: 0 3rem;
    }

    .nav-container {
        padding: 0 3rem;
    }

    section {
        padding: 8rem 0;
    }

    .hero-content {
        gap: 6rem;
    }

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

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

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

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

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .business-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .vision-graphic {
        width: 500px;
        height: 500px;
    }

    .impact-graphic {
        width: 500px;
        height: 400px;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    :root {
        --max-width: 1400px;
    }

    .section-container {
        padding: 0 4rem;
    }

    .nav-container {
        padding: 0 4rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Optimize for high DPI displays */
    .founder-placeholder,
    .business-placeholder,
    .vision-graphic,
    .impact-graphic {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .navbar,
    .nav-toggle,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    .business-card,
    .stat-item,
    .value-card {
        break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode preferences */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #ffffff;
        --secondary-color: #000000;
        --accent-color: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-light: #999999;
        --border-color: #333333;
        --shadow-light: 0 2px 10px rgba(255,255,255,0.05);
        --shadow-medium: 0 4px 20px rgba(255,255,255,0.1);
        --shadow-heavy: 0 8px 40px rgba(255,255,255,0.15);
    }

    .navbar {
        background: rgba(0, 0, 0, 0.95);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu {
        background-color: rgba(0, 0, 0, 0.98);
    }

    .founder-placeholder,
    .business-placeholder {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        color: var(--text-light);
    }

    .vision-graphic,
    .impact-graphic {
        background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%);
        border-color: var(--border-color);
    }
}
