/* Premium Mela Trilogy Design System */
:root {
    --mela-turquoise: #0FA3A3;
    --mela-turquoise-hover: #0c8282;
    --mela-yellow: #F6A623;
    --mela-yellow-hover: #db931e;
    --mela-green: #3AA14A;
    --mela-green-hover: #30893d;
    --mela-navy: #0B1E3B;
    --mela-light-grey: #F7F9FB;
    --mela-mid-grey: #D1D5DB;
    --mela-dark-grey: #3A3F47;
    --mela-white: #FFFFFF;

    --radius-sm: 8px;
    --radius-md: 24px;
    --radius-lg: 48px;

    --shadow-soft: 0 10px 30px rgba(11, 30, 59, 0.08);
    --shadow-hover: 0 15px 40px rgba(11, 30, 59, 0.15);

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--mela-light-grey);
    font-family: 'Inter', sans-serif;
    color: var(--mela-dark-grey);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.nav-links a,
.btn {
    font-family: 'Montserrat', sans-serif;
}

/* Base Utility Classes */
.text-center {
    text-align: center;
}

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

.text-turquoise {
    color: var(--mela-turquoise);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--mela-turquoise);
    color: var(--mela-white);
    box-shadow: 0 8px 20px rgba(15, 163, 163, 0.3);
}

.btn-primary:hover {
    background-color: var(--mela-turquoise-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(15, 163, 163, 0.4);
}

.btn-secondary {
    background-color: var(--mela-navy);
    color: var(--mela-white);
    box-shadow: 0 8px 20px rgba(11, 30, 59, 0.2);
}

.btn-secondary:hover {
    background-color: #081529;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(11, 30, 59, 0.3);
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--mela-navy);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--mela-turquoise);
}

.nav-btn {
    background: var(--mela-yellow);
    color: var(--mela-navy) !important;
    padding: 10px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
}

.nav-btn:hover {
    background: var(--mela-yellow-hover);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    padding: 160px 0 80px;
    position: relative;
    background: linear-gradient(135deg, var(--mela-navy) 0%, #153669 100%);
    color: var(--mela-white);
    overflow: hidden;
    border-bottom-right-radius: 80px;
}

.hero-bg,
.hero-trilogy-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    color: var(--mela-yellow);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px 0;
}

.hero-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0 0 40px 0;
    color: rgba(255, 255, 255, 0.85);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Floating Image */
.hero-image-wrapper {
    flex: 1;
    position: relative;
}

.hero-image {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    transform: rotate(3deg);
    transition: var(--transition-smooth);
}

.hero-image-wrapper:hover .hero-image {
    transform: rotate(0deg) scale(1.02);
}

/* Trilogy Section */
.trilogy-section {
    padding: 80px 0;
    background: var(--mela-white);
}

.trilogy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.trilogy-card {
    background: var(--mela-white);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--mela-light-grey);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.trilogy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.card-innovation::before {
    background: var(--mela-turquoise);
}

.card-speed::before {
    background: var(--mela-yellow);
}

.card-quality::before {
    background: var(--mela-green);
}

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

.trilogy-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}

.card-innovation .trilogy-icon {
    background: rgba(15, 163, 163, 0.1);
    color: var(--mela-turquoise);
}

.card-speed .trilogy-icon {
    background: rgba(246, 166, 35, 0.1);
    color: var(--mela-yellow);
}

.card-quality .trilogy-icon {
    background: rgba(58, 161, 74, 0.1);
    color: var(--mela-green);
}

.trilogy-card h3 {
    font-size: 1.5rem;
    color: var(--mela-navy);
    margin: 0 0 15px 0;
}

.trilogy-card p {
    color: var(--mela-dark-grey);
    line-height: 1.6;
    margin: 0;
}

/* Products Section */
.section {
    padding: 100px 0;
}

.bg-light {
    background: var(--mela-light-grey);
}

.section-title {
    font-size: 2.5rem;
    color: var(--mela-navy);
    font-weight: 800;
    margin: 0 0 15px 0;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--mela-dark-grey);
    font-size: 1.1rem;
    margin: 0 0 50px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--mela-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

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

.product-img {
    height: 220px;
    width: 100%;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    background: #fdfdfd;
    transition: var(--transition-smooth);
}

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

.product-info {
    padding: 25px;
    text-align: center;
    border-top: 1px solid var(--mela-light-grey);
}

.product-info h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--mela-navy);
}

/* Pricing Packages Section */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
}

.package-card {
    background: var(--mela-white);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 2px solid transparent;
    transition: var(--transition-smooth);
}

.package-card.popular {
    transform: scale(1.05);
    border-color: var(--mela-turquoise);
    position: relative;
    box-shadow: var(--shadow-hover);
}

.pop-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mela-yellow);
    color: var(--mela-navy);
    padding: 6px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 700;
}

.pkg-title {
    font-size: 1.5rem;
    color: var(--mela-navy);
    margin: 0 0 15px;
}

.pkg-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--mela-turquoise);
    margin: 0 0 30px;
}

.pkg-price span {
    font-size: 1rem;
    color: var(--mela-dark-grey);
}

.package-card.popular .btn {
    width: 100%;
}

/* Floating WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.floating-wa:hover {
    transform: scale(1.1);
    background: #20bd5a;
}

/* Footer */
footer {
    background: var(--mela-navy);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-col h4 {
    color: var(--mela-white);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-col ul a:hover {
    color: var(--mela-turquoise);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* Why Choose MELA? */
.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: end;
    margin-top: 40px;
}

.feature-box {
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.feature-icon img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.1));
}

.feature-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mela-navy);
    padding: 0 5px;
    font-family: 'Montserrat', sans-serif;
}

/* Recent Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.project-box {
    background: var(--mela-navy);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.project-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.project-img-wrapper {
    height: 180px;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.project-box:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.project-label-solid {
    background: var(--mela-navy);
    color: var(--mela-white);
    text-align: center;
    padding: 15px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* Dynamic Promo Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 30, 59, 0.85);
    /* Navy transparent */
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.05);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.modal-content {
    position: relative;
    max-width: 850px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    background: var(--mela-white);
}

/* Hide scrollbar for modal content */
.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--mela-white);
    color: var(--mela-navy);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: #FF3B30;
    color: var(--mela-white);
    transform: rotate(90deg) scale(1.1);
}

/* Specific resets for flyer inside modal */
.modal-content .flyer-wrapper {
    margin: 0;
    box-shadow: none;
    padding: 40px 30px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.modal-content .flyer-header {
    padding-top: 0;
}

.modal-content .flyer-logo {
    margin-bottom: 10px;
}

.modal-content .flyer-cta {
    padding: 30px;
    margin-bottom: 0;
}

.modal-content .btn-large {
    font-size: 1.1rem;
    padding: 15px 30px;
    width: 90%;
}

.modal-content .stat-box {
    padding: 20px 10px;
}

.modal-content .stat-box i {
    font-size: 2.2rem;
}

.modal-content .stat-box p {
    font-size: 0.95rem;
}

/* Contact & Lead Form styling */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.text-left {
    text-align: left;
}

.contact-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-methods li {
    font-size: 1.1rem;
    color: var(--mela-navy);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.contact-methods i {
    color: var(--mela-turquoise);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.contact-form-container {
    background: var(--mela-white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--mela-light-grey);
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--mela-turquoise);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--mela-navy);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--mela-mid-grey);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: #fdfdfd;
    transition: var(--transition-fast);
    box-sizing: border-box;
    color: var(--mela-dark-grey);
}

.form-control:focus {
    outline: none;
    border-color: var(--mela-turquoise);
    box-shadow: 0 0 0 3px rgba(15, 163, 163, 0.15);
    background: var(--mela-white);
}

.form-success-msg {
    margin-top: 15px;
    padding: 15px;
    background: rgba(58, 161, 74, 0.1);
    color: var(--mela-green);
    border: 1px solid var(--mela-green);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
}

/* --- PLAYGROUND CREATIVE ANIMATIONS --- */

@keyframes swingFloat {
    0% {
        transform: rotate(3deg) translateY(0px);
    }

    50% {
        transform: rotate(-1deg) translateY(-15px);
    }

    100% {
        transform: rotate(3deg) translateY(0px);
    }
}

@keyframes gentleBounce {

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

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

@keyframes seeSawHover {
    0% {
        transform: scale(1.02) rotate(0deg);
    }

    33% {
        transform: scale(1.05) rotate(2deg);
    }

    66% {
        transform: scale(1.05) rotate(-2deg);
    }

    100% {
        transform: scale(1.05) rotate(0deg);
    }
}

/* 1. The Hero Image swings gently like a swing set */
.hero-image-wrapper {
    animation: swingFloat 6s ease-in-out infinite;
    transform-origin: top center;
}

/* 2. The Trilogy & Product Cards do a playful see-saw on hover */
.trilogy-card:hover,
.product-card:hover,
.project-box:hover,
.package-card:hover {
    animation: seeSawHover 0.6s ease-in-out forwards;
    box-shadow: var(--shadow-hover);
}

/* 3. The 3D Icons gently bounce like playground balls */
.feature-icon img {
    animation: gentleBounce 4s ease-in-out infinite;
}

/* Stagger the bounces for a lively, organic playground effect */
.feature-box:nth-child(even) .feature-icon img {
    animation-delay: 1.5s;
}

.feature-box:nth-child(3n) .feature-icon img {
    animation-delay: 0.7s;
}

/* 4. Floating WhatsApp button gets a constant gentle pulse/bounce to playfully attract attention */
.floating-wa {
    animation: gentleBounce 3s infinite;
}

.floating-wa:hover {
    animation: none;
    /* stop bouncing on hover to make it easy to click */
    transform: scale(1.15) rotate(5deg);
}

/* 5. Stat boxes inside the popup get a playful pop-in effect */
@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

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

.modal-overlay.active .stat-box {
    opacity: 0;
    /* starts hidden */
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-overlay.active .stat-box:nth-child(1) {
    animation-delay: 0.1s;
}

.modal-overlay.active .stat-box:nth-child(2) {
    animation-delay: 0.3s;
}

.modal-overlay.active .stat-box:nth-child(3) {
    animation-delay: 0.5s;
}

/* --- MOBILE RESPONSIVE DESIGN --- */

@media (max-width: 900px) {

    .trilogy-grid,
    .products-grid,
    .packages-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        margin-top: 20px;
    }

    .hero-buttons {
        justify-content: center;
    }
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: var(--mela-navy);
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
    color: var(--mela-turquoise);
}

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

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

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    /* Adjust offset for standard mobile navbar */
    .nav-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .mobile-menu-btn {
        display: block;
        /* Show hamburger */
    }

    .nav-links {
        display: none;
        /* Hide links by default */
        width: 100%;
        flex-direction: column;
        padding: 20px 0 10px;
        margin-top: 15px;
        border-top: 1px solid var(--mela-light-grey);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
        /* Show dropdown */
        animation: navMenuDrop 0.3s ease;
    }

    .hero-section {
        padding: 80px 0 60px;
        border-bottom-right-radius: 40px;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .trilogy-grid,
    .products-grid,
    .packages-grid,
    .projects-grid,
    .lists-panel {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info .text-left,
    .contact-info .section-subtitle {
        text-align: center;
    }

    .contact-methods li {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .flyer-huge {
        font-size: 2.2rem;
    }

    .flyer-subhuge {
        font-size: 1.5rem;
    }

    .flyer-core-stats {
        grid-template-columns: 1fr;
    }

    .flyer-wrapper {
        padding: 40px 20px;
    }

    .modal-content .flyer-wrapper {
        padding: 30px 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header {
        padding: 60px 20px 40px;
    }
}