/* Fish and Greens Aquafarm - Mobile Responsive CSS */

:root {
    --aqua-green: #22c55e;
    --aqua-blue: #0ea5e9;
    --nature-green: #16a34a;
    --earth-brown: #92400e;
}

body {
    font-family: Inter, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Mobile Navigation */
.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

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

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

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--nature-green);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

.success-message {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 1px solid var(--nature-green);
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* ===============================
   MOBILE STYLES (max-width: 768px)
   =============================== */

@media (max-width: 768px) {
    /* Hero Section */
    #home h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    #home p.text-xl {
        font-size: 1rem !important;
    }
    
    /* Stats row - make it wrap properly */
    #home .flex.items-center.space-x-8 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        text-align: center;
    }
    
    #home .flex.items-center.space-x-8 > div {
        margin: 0 !important;
    }
    
    #home .flex.items-center.space-x-8 .text-3xl {
        font-size: 1.5rem !important;
    }
    
    #home .flex.items-center.space-x-8 .text-sm {
        font-size: 0.7rem !important;
    }
    
    /* Buttons stack vertically */
    #home .flex.flex-col.sm\:flex-row {
        flex-direction: column !important;
        width: 100%;
    }
    
    #home .flex.flex-col.sm\:flex-row a {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    /* All section grids to single column */
    .grid.grid-cols-1.lg\:grid-cols-2,
    .grid.lg\:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Benefits grid */
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    /* Section headings */
    h2.text-4xl {
        font-size: 1.5rem !important;
    }
    
    h3.text-2xl {
        font-size: 1.25rem !important;
    }
    
    h3.text-xl {
        font-size: 1.1rem !important;
    }
    
    /* Padding fixes */
    .px-4, .sm\:px-6, .lg\:px-8 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .py-20 {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    /* Newsletter form */
    #newsletterForm {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #newsletterForm input {
        width: 100% !important;
    }
    
    #newsletterForm button {
        width: 100% !important;
    }
    
    /* Contact section */
    #contact .grid {
        grid-template-columns: 1fr !important;
    }
    
    #contact .space-y-6 .flex.items-center.space-x-4 {
        flex-direction: column !important;
        text-align: center;
        gap: 10px !important;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px !important;
    }
    
    footer .col-span-2 {
        grid-column: span 1 !important;
    }
    
    footer .flex.space-x-4 {
        justify-content: center !important;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Vision goals box */
    .bg-gradient-to-br {
        padding: 15px !important;
    }
    
    /* Remove hero image decoration on mobile */
    #home .relative .absolute {
        display: none !important;
    }
    
    /* Fix space-x on mobile */
    .space-x-8 > * + * {
        margin-left: 0 !important;
    }
    
    .space-x-4 > * + * {
        margin-left: 0 !important;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #home h1 {
        font-size: 1.5rem !important;
    }
    
    #home .flex.items-center.space-x-8 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    #home .flex.items-center.space-x-8 > div {
        padding: 10px;
        background: rgba(255,255,255,0.5);
        border-radius: 10px;
    }
    
    .text-xl {
        font-size: 0.95rem !important;
    }
    
    section {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    #contact .grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* Additional Newsletter Form Mobile Fix */
@media (max-width: 768px) {
    #newsletterForm {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #newsletterForm > * {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    #newsletterForm input {
        flex: none !important;
    }
    
    /* Fix Tailwind space-x classes on mobile */
    .space-x-2 > * + *,
    .space-x-4 > * + *,
    .space-x-8 > * + * {
        margin-left: 0 !important;
    }
    
    /* Contact info icons centered */
    #contact .rounded-full.p-3 {
        margin-bottom: 10px;
    }
}

/* Vision Section Goal Box Mobile Fix */
@media (max-width: 768px) {
    /* Goals progress box */
    #future .space-y-8 > div:first-child {
        padding: 20px !important;
    }
    
    /* Interested button section */
    #future .text-center.space-y-4 {
        margin-top: 30px;
    }
    
    /* Vision items with icons */
    #future .flex.items-start.space-x-4 {
        flex-direction: column !important;
        text-align: center;
        align-items: center !important;
    }
    
    #future .flex.items-start.space-x-4 > div:first-child {
        margin-bottom: 15px;
    }
    
    /* Launch date box */
    #future .bg-nature-green\/10 {
        text-align: center;
    }
    
    #future .bg-nature-green\/10 .flex {
        justify-content: center !important;
    }
}

/* Small screen stats grid fix */
@media (max-width: 480px) {
    #home .pt-8 .flex {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-around !important;
        gap: 15px !important;
    }
    
    #home .pt-8 .flex > div {
        flex: 0 0 30% !important;
        text-align: center;
    }
}

/* Ensure images dont overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix hero image container on mobile */
@media (max-width: 768px) {
    #home .relative {
        margin-top: 30px;
    }
    
    #home .rounded-2xl.shadow-2xl {
        border-radius: 15px;
    }
}
