/* Bootstrap 5 CDN Integration */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css');

/* Google Fonts - Modern and Professional */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Global Variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #004080;
    --accent-color: #ff6b35;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-ocean: #e3f2fd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    border-radius: 25px;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-ocean), #bbdefb);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%230066cc" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    background: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery {
    position: relative;
}

.gallery-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.gallery-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

.product-body {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-samoan-name {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.5;
}

/* Search and Filter Section */
.search-filter-section {
    background: var(--bg-light);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 15px;
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    outline: none;
}

.category-filter {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    outline: none;
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    justify-content: center;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    margin: 0 2px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Location Section */
.location-section {
    padding: 3rem 0;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
    background: var(--bg-light);
}

/* Contact Section */
.contact-info {
    background: linear-gradient(135deg, var(--bg-ocean), #bbdefb);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .product-card {
        margin-bottom: 1.5rem;
    }

    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .search-filter-section {
        padding: 1rem;
    }

    .contact-info {
        padding: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in {
    animation: slideIn 0.8s ease-out;
}

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

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.btn:focus,
.search-input:focus,
.category-filter:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Responsive styles are included directly *//* Additional Mobile Responsiveness Styles */

/* Extra Small Devices (phones) */
@media (max-width: 575.98px) {
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important;
    }

    /* Typography adjustments */
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .display-4 {
        font-size: 2rem !important;
    }

    .display-5 {
        font-size: 1.5rem !important;
    }

    .display-6 {
        font-size: 1.25rem !important;
    }

    /* Button adjustments */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }

    /* Card adjustments */
    .card {
        margin-bottom: 1.5rem;
    }

    .product-card {
        margin-bottom: 1.5rem;
    }

    .value-card, .team-member {
        margin-bottom: 1.5rem;
    }

    /* Form adjustments */
    .contact-form {
        padding: 1.5rem;
    }

    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Search and filter adjustments */
    .search-filter-section {
        padding: 1rem;
    }

    .search-input-group {
        display: flex;
        gap: 0.5rem;
    }

    .search-input-group .form-control {
        flex: 1;
    }

    .search-input-group .btn {
        padding: 0.75rem 1rem;
    }

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

    /* Filter sidebar */
    .filter-sidebar {
        position: static;
        margin-bottom: 2rem;
        padding: 1.5rem;
    }

    /* Map adjustments */
    .map-container, .contact-map {
        height: 300px;
    }

    /* Timeline adjustments */
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        padding: 1.5rem;
    }

    .timeline-year {
        font-size: 0.875rem;
        padding: 0.25rem 0.75rem;
    }

    /* Statistics adjustments */
    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Contact cards */
    .contact-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Operating hours table */
    .hours-table {
        font-size: 0.875rem;
    }

    .hours-table th,
    .hours-table td {
        padding: 0.5rem;
    }

    /* FAQ accordion */
    .accordion-button {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .accordion-body {
        font-size: 0.9rem;
    }

    /* Footer adjustments */
    footer {
        padding: 2rem 0 1rem;
    }

    .footer-links {
        font-size: 0.9rem;
    }

    /* Social links */
    .social-link {
        width: 45px;
        height: 45px;
    }
}

/* Small Devices (landscape phones) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-content {
        padding: 1.75rem;
    }

    .contact-card {
        margin-bottom: 1.5rem;
    }

    .hero-buttons .btn {
        margin-bottom: 0;
    }
}

/* Medium Devices (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .timeline-content {
        width: 42%;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: auto;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-right: auto;
    }

    .contact-card {
        margin-bottom: 2rem;
    }

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

/* Large Devices (desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-content {
        width: 44%;
    }
}

/* Extra Large Devices (large desktops) */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    .btn, .nav-link, .gallery-nav, .gallery-indicator {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Gallery navigation adjustments */
    .gallery-nav {
        width: 50px;
        height: 50px;
    }

    .gallery-indicator {
        width: 12px;
        height: 12px;
    }

    /* Product card adjustments */
    .product-card {
        cursor: pointer;
    }

    /* Accordion adjustments */
    .accordion-button {
        min-height: 48px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }

    .form-control:focus {
        border-width: 2px;
    }

    .card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@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;
    }

    .hero-section::before,
    .about-hero::before {
        animation: none;
    }
}

/* Print styles */
@media print {
    /* Hide navigation and footer */
    .navbar,
    footer,
    .btn,
    .gallery-nav,
    .pagination,
    .social-links {
        display: none !important;
    }

    /* Adjust text and backgrounds */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }

    .hero-section,
    .about-hero,
    .map-section {
        background: white !important;
        color: black !important;
    }

    /* Remove shadows and borders */
    .card,
    .contact-card,
    .product-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    /* Ensure content fits page */
    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Page breaks */
    .timeline-item {
        page-break-inside: avoid;
    }

    .product-card {
        page-break-inside: avoid;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

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

    .hero-buttons {
        margin-top: 1rem;
    }

    .map-container,
    .contact-map {
        height: 250px;
    }
}

/* Small screen optimizations for forms */
@media (max-width: 480px) {
    .row.g-3 .col-md-4 {
        margin-bottom: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix viewport height bug */
    .hero-section,
    .about-hero {
        min-height: -webkit-fill-available;
    }

    /* Prevent zoom on input focus */
    .form-control {
        font-size: 16px;
    }
}

/* Android specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
    .navbar {
        position: sticky;
    }
}