/* Global Variables and Base Styles */
:root {
    --navy: #072A57;
    --olive: #A8C02B;
    --text: #1F2D3D;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
}

/* Utility Classes */
.accent-color {
    color: var(--olive);
}

.accent-bg {
    background-color: var(--olive);
}

.navy-bg {
    background-color: var(--navy);
}

.text-navy {
    color: var(--navy);
}

.border-olive {
    border-color: var(--olive);
}

/* Common Components */
.hero-gradient {
    background: linear-gradient(90deg, rgba(7, 42, 87, 0.9) 0%, rgba(7, 42, 87, 0.7) 100%);
}

.divider {
    height: 2px;
    background-color: var(--olive);
    margin: 20px 0;
}

.divider-center {
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes floatAnimation {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -20px) rotate(90deg);
    }

    50% {
        transform: translate(0, -40px) rotate(180deg);
    }

    75% {
        transform: translate(-20px, -20px) rotate(270deg);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.float-up {
    opacity: 0;
    animation: floatUp 0.8s ease forwards;
}

.float-down {
    opacity: 0;
    animation: floatDown 0.8s ease forwards;
}

.float-left {
    opacity: 0;
    animation: floatLeft 0.8s ease forwards;
}

.float-right {
    opacity: 0;
    animation: floatRight 0.8s ease forwards;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.bounce-animation {
    animation: bounce 0.5s ease;
}

.spin-animation {
    animation: spin 1s linear;
}

.shake-animation {
    animation: shake 0.5s ease;
}

/* Spacing Utilities */
.section-vertical-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-vertical-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (min-width: 1024px) {
    .section-vertical-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
    animation: none;
}

.whatsapp-float::after {
    content: 'Chat with us';
    position: absolute;
    left: 70px;
    background: #25D366;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.whatsapp-float:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Home Page Specific */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--olive);
}

.contact-strip {
    background: linear-gradient(90deg, var(--navy) 0%, #1a3a6d 100%);
}

/* About Page Specific */
.team-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--olive);
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid var(--olive);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 40px;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: var(--olive);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--olive);
}

.timeline-item:after {
    content: '';
    position: absolute;
    left: 9px;
    top: 20px;
    width: 2px;
    height: calc(100% + 20px);
    background-color: #e5e7eb;
}

.timeline-item:last-child:after {
    display: none;
}

/* Products Page Specific */
.filter-chip {
    padding: 8px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.filter-chip:hover {
    border-color: var(--olive);
    color: var(--olive);
}

.filter-chip.active {
    background-color: var(--olive);
    color: white;
    border-color: var(--olive);
}

.category-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.category-card:hover {
    transform: scale(1.05);
    border-color: var(--olive);
}

.product-image {
    height: 280px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Gallery Page Specific */
.gallery-filter {
    padding: 10px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.gallery-filter:hover {
    border-color: var(--olive);
    color: var(--olive);
    transform: translateY(-2px);
}

.gallery-filter.active {
    background-color: var(--olive);
    color: white;
    border-color: var(--olive);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 192, 43, 0.3);
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: galleryItemAppear 0.8s ease forwards;
}

@keyframes galleryItemAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(7, 42, 87, 0.9), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.instagram-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.gallery-item:hover .instagram-icon {
    opacity: 1;
    transform: translateY(0);
}

/* Masonry Layout */
.masonry-grid {
    column-count: 1;
    column-gap: 24px;
}

@media (min-width: 640px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (min-width: 1280px) {
    .masonry-grid {
        column-count: 4;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 24px;
}

/* Lightbox Customization */
.lightbox .lb-image {
    border-radius: 8px;
    animation: lightboxOpen 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lightboxOpen {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox .lb-nav a.lb-prev,
.lightbox .lb-nav a.lb-next {
    opacity: 1;
    transition: all 0.3s ease;
}

.lightbox .lb-nav a.lb-prev:hover,
.lightbox .lb-nav a.lb-next:hover {
    transform: scale(1.2);
}

.lightbox .lb-data .lb-caption {
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    animation: captionFadeIn 0.5s ease 0.3s both;
}

@keyframes captionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lightbox .lb-data .lb-close {
    opacity: 1;
    transition: all 0.3s ease;
    animation: closeButtonAppear 0.5s ease 0.2s both;
}

@keyframes closeButtonAppear {
    from {
        opacity: 0;
        transform: rotate(-90deg);
    }

    to {
        opacity: 1;
        transform: rotate(0);
    }
}

.lightbox .lb-close:hover {
    transform: rotate(90deg) scale(1.1);
}

/* Gallery Floating Share Button */
.share-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--olive);
    color: var(--navy);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(168, 192, 43, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    animation: floatAnimation 3s ease-in-out infinite;
}

.share-floating:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 30px rgba(168, 192, 43, 0.4);
}

/* Gallery Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.share-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    animation: modalContentAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalContentAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Gallery Image Hover Effects */
.zoom-in-effect {
    overflow: hidden;
    border-radius: 12px;
}

.zoom-in-effect img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.zoom-in-effect:hover img {
    transform: scale(1.15);
}

/* Gallery Staggered Animation Delay */
.gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.5s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.6s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.7s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.8s;
}

.gallery-item:nth-child(9) {
    animation-delay: 0.9s;
}

.gallery-item:nth-child(10) {
    animation-delay: 1.0s;
}

.gallery-item:nth-child(11) {
    animation-delay: 1.1s;
}

.gallery-item:nth-child(12) {
    animation-delay: 1.2s;
}

.gallery-item:nth-child(13) {
    animation-delay: 1.3s;
}

.gallery-item:nth-child(14) {
    animation-delay: 1.4s;
}

.gallery-item:nth-child(15) {
    animation-delay: 1.5s;
}

/* Contact Page Specific */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.ripple-effect:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

/* Contact Card Animations */
.contact-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--olive);
    box-shadow: 0 20px 40px rgba(7, 42, 87, 0.1);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 192, 43, 0.1), transparent);
    transition: left 0.6s ease;
}

.contact-card:hover::before {
    left: 100%;
}

/* Contact Form Animations */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(168, 192, 43, 0.1);
    transform: translateY(-2px);
}

.form-input.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.form-input.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.submit-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(168, 192, 43, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Contact Success/Error Messages */
.success-message {
    animation: floatUp 0.5s ease;
}

.error-message {
    animation: shake 0.5s ease;
}

/* Contact Map Container */
#map {
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

#map.animated {
    opacity: 1;
    transform: translateY(0);
    animation: floatUp 1s ease 0.3s forwards;
}

.leaflet-container {
    font-family: inherit;
    z-index: 1;
    border-radius: 12px;
}

.leaflet-popup-content {
    font-family: 'Inter', sans-serif;
}

/* Contact Methods */
.contact-method {
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Contact Hours Animation */
.hours-table tr {
    opacity: 0;
    transform: translateX(-20px);
    animation: floatRight 0.5s ease forwards;
}

.hours-table tr:nth-child(1) {
    animation-delay: 0.1s;
}

.hours-table tr:nth-child(2) {
    animation-delay: 0.2s;
}

.hours-table tr:nth-child(3) {
    animation-delay: 0.3s;
}

.hours-table tr:nth-child(4) {
    animation-delay: 0.4s;
}

.hours-table tr:nth-child(5) {
    animation-delay: 0.5s;
}

.hours-table tr:nth-child(6) {
    animation-delay: 0.6s;
}

.hours-table tr:nth-child(7) {
    animation-delay: 0.7s;
}

/* Contact Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 192, 43, 0.1), rgba(7, 42, 87, 0.05));
    z-index: -1;
}

.floating-element-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation: floatAnimation 20s ease-in-out infinite;
}

.floating-element-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 10%;
    animation: floatAnimation 25s ease-in-out infinite reverse;
}
