/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors derived from Krudi Palette */
    --zest: #e17a1c;
    --brandy-punch: #d19036;
    --denim: #1075b7;
    --porcelain: #e8eeef;
    --cape-palliser: #a27b47;
    --viking: #81b7dc;
    --bismark: #457485;

    /* Semantic Colors */
    --primary: var(--denim);
    --secondary: var(--zest);
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background: #ffffff;
    --background-alt: var(--porcelain);

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--denim) 0%, var(--viking) 100%);
    --gradient-warm: linear-gradient(135deg, var(--zest) 0%, var(--brandy-punch) 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(16, 117, 183, 0.9), rgba(69, 116, 133, 0.9));

    /* Layout */
    --container-max-width: 1280px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-brand: 0 10px 25px -5px rgba(16, 117, 183, 0.4);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

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

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

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

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

.text-white {
    color: white;
}

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

.bg-white {
    background-color: white;
}

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

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

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

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

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

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

.section {
    padding: 80px 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--denim);
    box-shadow: var(--shadow-brand);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--brandy-punch);
    box-shadow: 0 10px 25px -5px rgba(225, 122, 28, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* Header */
.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    height: 70px;
    background: white;
    box-shadow: var(--shadow-md);
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(16, 117, 183, 0.1);
}

.card-img {
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    border-bottom: 1px solid var(--porcelain);
}

.mobile-menu a {
    display: block;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--primary);
}

.mobile-menu .dropdown-content {
    display: block;
    position: static;
    box-shadow: none;
    padding: 0 0 0 20px;
    background: transparent;
}

.mobile-menu .dropdown-content a {
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 48px 0;
    }

    .header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .header .btn {
        display: none;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .card-img {
        height: 200px;
    }

    .text-light {
        font-size: 0.95rem;
    }

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

    /* Fix header on mobile */
    .header {
        height: 70px;
    }

    .header .logo img {
        height: 50px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

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

    .container {
        padding: 0 32px;
    }
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    border-radius: var(--radius-sm);
    padding: 8px 0;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: var(--porcelain);
    color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Rotate caret on hover (optional) */
.dropdown>a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
    opacity: 0.6;
}