/* 
  ╔═══════════════════════════════════════════════════════════════╗
  ║                                                               ║
  ║      ██╗  █████╗       ██╗  ██╗ █████╗ ██╗    ██╗██╗  ██╗     ║
  ║      ██║ ██╔═══██╗     ██║  ██║██╔══██╗██║    ██║██║ ██╔╝     ║
  ║      ██║ ██║   ██║     ███████║███████║██║ █╗ ██║█████╔╝      ║
  ║ ██   ██║ ██║   ██║     ██╔══██║██╔══██║██║███╗██║██╔═██╗      ║
  ║ ╚█████╔╝ ╚██████╔╝     ██║  ██║██║  ██║╚███╔███╔╝██║  ██╗     ║
  ║  ╚════╝   ╚═════╝      ╚═╝  ╚═╝╚═╝  ╚═╝ ╚══╝╚══╝ ╚═╝  ╚═╝     ║
  ║                                                               ║
====================================================================
  ║    Developer: JO HAWK                                         ║
  ║    Website: https://johawk.in/                                ║
  ║    Version: 1.0                                               ║
  ║    Date: 19 OCT 2025                                          ║
  ║    Client: Biophile Technologies                              ║
====================================================================
  ║    (c) 2025 | All coding & designing rights reserved          ║
  ║               to Jo Hawk (aka) Jishnu Omanakuttan             ║
  ╚═══════════════════════════════════════════════════════════════╝
*/

/* Mobile First Responsive Design */

/* Mobile Styles (default) */
.container {
    padding: 0 15px;
}

.nav-container {
    padding: 0 15px;
}

.logo img {
    height: 35px;
    max-width: 120px;
}

.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: none;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-menu ul {
    flex-direction: column;
    gap: 20px;
}

.nav-right {
    gap: 10px;
}

.search-icon {
    font-size: 16px;
}

.search-container {
    width: 95%;
}

.search-container input {
    font-size: 16px;
    padding: 12px 70px 12px 12px;
}

.search-submit {
    font-size: 16px;
    right: 40px;
}

.search-close {
    font-size: 20px;
    right: 12px;
}

.search-bar {
    max-width: 100%;
    padding: 0 15px;
}

.search-bar input {
    font-size: 16px;
    padding: 12px 45px 12px 12px;
}

.search-bar .search-submit {
    font-size: 16px;
    right: 12px;
}

#results-container {
    grid-template-columns: 1fr;
}

.nav-menu ul {
    gap: 20px;
}

.nav-menu a {
    font-size: 24px;
    padding: 12px 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

.nav-close {
    font-size: 28px;
    top: 15px;
    right: 15px;
}

.hamburger {
    display: flex;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.hero {
    height: 100vh;
}

.hero-content h1 {
    font-size: 28px;
}

.hero-content p {
    font-size: 16px;
}

.slide-content {
    padding: 30px 20px;
}

/* Mobile: Keep content at bottom to avoid overlap with controls */
@media (max-width: 767px) {
    .slide-content {
        top: auto;
        bottom: 20px;
        left: 0;
        right: 0;
        transform: none;
    }
}

.slider-controls {
    bottom: 20px;
}

.slider-controls button {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.services-grid,
.updates-grid,
.theme-grid,
.team-grid,
.values-grid,
.work-grid,
.testimonials-grid,
.opportunities-grid,
.resources-grid,
.blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.categories-grid {
    grid-template-columns: 1fr;
}

.materials-grid {
    grid-template-columns: 1fr;
}

.footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-container {
    padding: 20px;
}

.contact-form {
    padding: 20px;
}

.newsletter-form {
    flex-direction: column;
}

.newsletter-form input {
    margin-bottom: 10px;
}

.carousel-item {
    flex: 0 0 150px;
    margin: 0 10px;
}

.partner-logo img {
    width: 80px;
    height: 80px;
}

.carousel-prev,
.carousel-next {
    width: 35px;
    height: 35px;
    font-size: 16px;
}

.tabs {
    flex-direction: column;
    align-items: center;
}

.tab-button {
    width: 100%;
    max-width: 300px;
    border-bottom: 1px solid var(--medium-gray);
}

.tab-button.active {
    border-bottom-color: var(--primary-green);
}

.blog-post {
    flex-direction: column;
}

.blog-post img {
    width: 100%;
    height: 200px;
}

.paper-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .services-grid,
    .updates-grid,
    .theme-grid,
    .values-grid,
    .work-grid,
    .testimonials-grid,
    .opportunities-grid,
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .materials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-container {
        max-width: 700px;
    }

    .contact-form {
        padding: 30px;
    }

    .carousel-item {
        flex: 0 0 180px;
        margin: 0 15px;
    }

    .partner-logo img {
        width: 100px;
        height: 100px;
    }

    .tabs {
        flex-direction: row;
        justify-content: center;
    }

    .tab-button {
        width: auto;
        border-bottom: 2px solid transparent;
    }

    .blog-post {
        flex-direction: row;
    }

    .blog-post img {
        width: 150px;
        height: 150px;
    }

    .paper-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .newsletter-form {
        flex-direction: row;
    }

    .newsletter-form input {
        margin-bottom: 0;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .nav-menu {
        visibility: hidden;
        opacity: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-content h1 {
        font-size: 48px;
    }

    .hero-content p {
        font-size: 20px;
    }

    .services-grid,
    .updates-grid,
    .theme-grid,
    .work-grid,
    .testimonials-grid,
    .opportunities-grid,
    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-container {
        max-width: 800px;
    }

    .contact-form {
        padding: 40px;
    }

    .carousel-item {
        flex: 0 0 200px;
        margin: 0 15px;
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .materials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .services-grid,
    .updates-grid,
    .theme-grid,
    .work-grid,
    .testimonials-grid,
    .opportunities-grid,
    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

/* High-resolution displays */
@media (min-width: 1440px) {
    .hero-content h1 {
        font-size: 56px;
    }

    .hero-content p {
        font-size: 22px;
    }

    h1 { font-size: 48px; }
    h2 { font-size: 40px; }
    h3 { font-size: 28px; }
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .hero-single,
    .slider-controls,
    .back-to-top,
    .tabs,
    .carousel-prev,
    .carousel-next,
    .social-links,
    .newsletter-signup {
        display: none !important;
    }

    body {
        font-size: 12px;
        line-height: 1.4;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }

    .service-card,
    .update-card,
    .resource-card,
    .team-member,
    .value,
    .category-card,
    .testimonial,
    .opportunity,
    .opportunity-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .btn-primary,
    .btn-secondary {
        display: none;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #000000;
        --light-green: #ffffff;
        --earth-brown: #000000;
        --dark-green: #000000;
        --light-gray: #ffffff;
        --medium-gray: #cccccc;
        --dark-gray: #000000;
        --white: #ffffff;
        --black: #000000;
    }
}

/* Focus visible for keyboard navigation */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.tab-button:focus-visible,
.carousel-prev:focus-visible,
.carousel-next:focus-visible,
.back-to-top:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Ensure sufficient color contrast */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-width: 2px;
}

/* Touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn-primary,
    .btn-secondary,
    .tab-button,
    .carousel-prev,
    .carousel-next,
    .back-to-top {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-menu a {
        padding: 12px 0;
        width: 100%;
        text-align: center;
    }
}