/* 1. CSS Variables - The "Theme" Controller */
:root {
    --primary-color: #020a11;    /* Navbar & Footer */
    --accent-color: #0e71f1;     /* Buttons & Highlights */
    --accent-color-2: #f5a328;   /* Buttons & Highlights */
    --bg-light: #b0c4bd;         /* Page Background */
    --card-bg: #eedb9f;          /* Card Background */
    --text-main: #333333;        /* General Text */
    --text-light: #ffffff;       /* Text on Dark Backgrounds */
    --container-width: 1100px;
}


/* 2. Reset & Base Styles */

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-light);
    color: var(--text-main);

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* 3. Navbar */

.custom-navbar {
    background-color: var(--primary-color); /* your navbar color */
}

/* Navbar text */
.custom-navbar .navbar-brand,
.custom-navbar .nav-link {
    color: var(--text-light);
}

/* Navigation layout */
.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Link hover + active */
.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
}

/* Dropdown menu */
.dropdown-menu {
    background-color: var(--text-light);   /* white background */
}

.dropdown-item {
    color: var(--text-main);               /* dark readable text */
}

.dropdown-item:hover {
    background-color: var(--bg-light);
}

/* Dropdown toggle */
.custom-navbar .dropdown-toggle {
    color: var(--text-light);
}

.custom-navbar .dropdown-toggle:hover {
    color: var(--accent-color);
}

.custom-navbar .dropdown-toggle.show {
    color: var(--accent-color);
}

/* Active nav link */
.custom-navbar .nav-link.active {
    color: var(--accent-color) !important;  /* changes the active page color */
    font-weight: 600;
}

/* Hover nav link */
.custom-navbar .nav-link:hover {
    color: var(--accent-color);             /*makes the hover color the same as the accent color */
}

/* Navbar toggle button */
.navbar-toggler {
    border-color: var(--text-light);
}

.navbar-toggler-icon {
    filter: invert(1);          /*inverts hamburger icon color */
}

/* Underline navbar links with fade effect */
.custom-navbar .nav-link {
    position: relative;
}

.custom-navbar .nav-link::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;

    background-color: var(--accent-color-2);
    transition: width 0.3s ease;
}

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


/* 4. Hero Section */

.hero {
    background:
        linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
        url('https://images.pexels.com/photos/1714208/pexels-photo-1714208.jpeg');

    background-size: cover;
    background-position: center;
    min-height: 60vh;
    min-height: 60dvh; /* modern fix for mobile browsers */
    display: flex;
    align-items: center;
}

/* Hero heading */
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 15px;

    display: inline-block;

    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);

    /* Frosted glass backdrop */
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(5px);
}

/* Hero paragraph */
.hero p {
    display: inline-block;

    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);

    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(5px);
}

/* Hero layout */
.custom-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Buttons */

.hero-btn,
.btn {
    background-color: var(--accent-color);
    color: var(--text-light);

    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;

    max-width: fit-content;
}

/* Button hover */
.hero-btn:hover,
.btn:hover {
    background-color: var(--accent-color-2);
    color: var(--text-main);

    transform: scale(1.05);         /* slightly enlarge button */
    transition: all 0.3s ease;      /*smooth out transition */
}


/* 5. Main Layout & Cards */

.container {
    flex: 1;

    width: 90%;
    max-width: var(--container-width);

    margin: 0 auto;
    padding: 40px 0;
}

/* Card grid layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */

    gap: 30px;
    margin-top: -100px; /* Overlap effect */
}

/* Card styling */
.card {
    background: var(--card-bg);

    padding: 40px 25px;
    border-radius: 12px;

    text-align: center;

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

/* Cards will now hover and enlarge slightly */
.card:not(.contact-card):hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Card images are now the same height */
.card-img-top{
    height:200px;
    object-fit:cover;
}

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

/* 6. Footer */

.footer {
    background: var(--primary-color);
    color: var(--text-light);
    width: 100%;
}

.bi-envelope,
.bi-telephone {
    margin-right: 0.5rem;
}


/* 7. MEDIA QUERIES (The Responsive Magic) */

/* Tablet & Smaller Screens */
@media (max-width: 992px) {

    .card-grid {
        grid-template-columns: repeat(2, 1fr); /* Drop to 2 columns */
        margin-top: 20px; /* Remove overlap for cleaner mobile feel */
    }

}

/* Mobile Phones */
@media (max-width: 600px) {

    .navbar {
        flex-direction: column; /* Stack logo and links */
        gap: 10px;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .card-grid {
        grid-template-columns: 1fr; /* 1 column on small phones */
    }

    .hero {
        height: 50vh;
    }

}