/* 
    This is our CSS (Cascading Style Sheets) file.
    CSS is used to style and layout web pages.
    It controls colors, fonts, spacing, positioning, and more.
*/

/* 
    CSS RESET & BASE STYLES
    These rules apply to all elements and create a consistent starting point.
*/

/* 
    The * selector means "all elements".
    We're removing default margins and padding from all elements.
    box-sizing: border-box makes width calculations include padding and border.
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 
    Root variables for colors and spacing.
    CSS custom properties (variables) allow us to reuse values.
    This makes it easy to change the theme later.
*/
:root {
    /* Primary colors */
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    
    /* Neutral colors */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #2c3e50;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                   'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* 
    BODY STYLES
    These styles apply to the entire page.
*/
body {
    font-family: var(--font-family);
    /* 
        font-family sets the typeface.
        We use a stack of fonts - if one isn't available, it tries the next.
    */
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--bg-color);
    /* 
        Smooth scrolling when clicking anchor links.
    */
    scroll-behavior: smooth;
}

/* 
    CONTAINER CLASS
    This is a utility class used throughout the site.
    It centers content and sets a maximum width.
*/
.container {
    max-width: 1200px;
    /* 
        max-width prevents content from being too wide on large screens.
    */
    margin: 0 auto;
    /* 
        margin: 0 auto centers the container horizontally.
        0 = no top/bottom margin, auto = equal left/right margins.
    */
    padding: 0 var(--spacing-sm);
    /* 
        Padding adds space inside the container.
        We use padding on left/right so content doesn't touch screen edges.
    */
}

/* 
    NAVBAR STYLES
    The navigation bar at the top of the page.
*/
.navbar {
    background-color: var(--bg-color);
    /* 
        box-shadow adds a subtle shadow below the navbar.
        This creates depth and separation from the content.
    */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    /* 
        position: sticky keeps the navbar at the top when scrolling.
        It's like fixed, but only sticks when you scroll past it.
    */
    top: 0;
    z-index: 1000;
    /* 
        z-index controls stacking order. Higher numbers appear on top.
        We want the navbar to always be visible above other content.
    */
    padding: var(--spacing-sm) 0;
}

.navbar .container {
    display: flex;
    /* 
        display: flex creates a flexible container.
        Children elements will be arranged in a row by default.
    */
    justify-content: space-between;
    /* 
        justify-content: space-between puts space between items.
        First item on left, last item on right.
    */
    align-items: center;
    /* 
        align-items: center vertically centers items in the flex container.
    */
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    /* 
        text-decoration: none removes the underline from links.
    */
    transition: var(--transition);
}

.nav-brand a:hover {
    color: var(--primary-dark);
    /* 
        :hover is a pseudo-class that styles elements when the mouse is over them.
    */
}

.nav-menu {
    display: flex;
    list-style: none;
    /* 
        list-style: none removes the bullet points from the list.
    */
    gap: var(--spacing-md);
    /* 
        gap adds space between flex items (modern way, cleaner than margins).
    */
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: var(--spacing-xs) var(--spacing-sm);
    /* 
        padding adds space inside the link, making it easier to click.
    */
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* 
    MOBILE MENU TOGGLE BUTTON
    This button is hidden on desktop and shown on mobile.
*/
.mobile-menu-toggle {
    display: none;
    /* 
        display: none hides the element completely.
    */
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* 
    HERO SECTION
    The large, eye-catching section at the top of the page.
*/
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* 
        linear-gradient creates a smooth color transition.
        135deg is the angle of the gradient.
    */
    color: white;
    padding: var(--spacing-xl) 0;
    /* 
        padding adds space inside the section.
    */
    min-height: 80vh;
    /* 
        min-height ensures the hero section takes up at least 80% of viewport height.
        vh = viewport height (1vh = 1% of screen height).
    */
    display: flex;
    align-items: center;
    /* 
        These flex properties center the content vertically.
    */
}

.hero-content {
    text-align: center;
    /* 
        text-align: center centers the text horizontally.
    */
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    /* 
        rem is a relative unit. 3rem = 3 × root font size (16px) = 48px.
        rem is better than px because it scales with user preferences.
    */
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    /* 
        margin-bottom adds space below the heading.
    */
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.95;
    /* 
        opacity makes the text slightly transparent.
    */
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    /* 
        flex-wrap: wrap allows buttons to stack on small screens.
    */
}

/* 
    BUTTON STYLES
    Reusable button styles.
*/
.btn {
    display: inline-block;
    /* 
        inline-block allows us to set width/height while keeping inline behavior.
    */
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    /* 
        border-radius rounds the corners of the button.
    */
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    /* 
        transform: translateY moves the button up slightly on hover.
        This creates a nice interactive effect.
    */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

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

/* 
    SECTION STYLES
    General styles for content sections.
*/
.section {
    padding: var(--spacing-lg) 0;
}

.section-alt {
    background-color: var(--bg-light);
    /* 
        Alternating background colors help separate sections visually.
    */
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    text-align: center;
}

.section p {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    margin-bottom: var(--spacing-sm);
}

/* 
    SERVICES GRID
    A grid layout to display services in a clean, organized way.
*/
.services-grid {
    display: grid;
    /* 
        CSS Grid creates a flexible grid layout.
    */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* 
        repeat(auto-fit, minmax(250px, 1fr)) creates responsive columns.
        - auto-fit: Automatically fits as many columns as possible
        - minmax(250px, 1fr): Each column is at least 250px wide, 
          and can grow to fill available space equally
    */
    gap: var(--spacing-md);
    /* 
        gap adds space between grid items.
    */
    margin-top: var(--spacing-md);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.service-item {
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    /* 
        border-radius rounds the corners of the service cards.
    */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 
        box-shadow adds a subtle shadow for depth.
    */
    transition: var(--transition);
    text-align: left;
    /* 
        text-align: left aligns text to the left within each card.
    */
}

.service-item:hover {
    transform: translateY(-5px);
    /* 
        translateY moves the card up slightly on hover.
    */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    /* 
        Stronger shadow on hover for a "lifted" effect.
    */
}

.service-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.service-item p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    /* 
        Override the section p text-align: center for service items.
    */
    margin: 0;
    /* 
        Remove default margins from paragraph.
    */
}

/* 
    CONTACT SECTION STYLES
    Styling for the contact information cards.
*/
.contact-intro {
    margin-bottom: var(--spacing-md) !important;
    /* 
        !important overrides the section p margin-bottom.
    */
}

.contact-grid {
    display: grid;
    /* 
        CSS Grid for contact items layout.
    */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* 
        Responsive grid that adapts to screen size.
    */
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-align: center;
    /* 
        Center-align content in contact cards.
    */
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 3rem;
    /* 
        Large icon size for visibility.
    */
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    /* 
        inline-block allows us to set width/height on the icon.
    */
}

.phone-icon {
    /* 
        Additional styling can be added here if needed.
    */
}

.email-icon {
    /* 
        Additional styling can be added here if needed.
    */
}

.contact-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.contact-item p {
    margin: 0;
    text-align: center;
    /* 
        Center-align the contact information.
    */
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    /* 
        inline-block allows hover effects to work better.
    */
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    /* 
        Underline on hover for better user feedback.
    */
}

/* 
    FOOTER STYLES
    The footer at the bottom of the page.
*/
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: var(--spacing-md) 0;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    /* 
        rgba allows us to set color with transparency.
        The last number (0.8) is the opacity (80%).
    */
}

/* 
    RESPONSIVE DESIGN
    Media queries allow us to change styles based on screen size.
    This makes the website work well on mobile, tablet, and desktop.
*/

/* 
    Tablet styles (screens smaller than 992px)
*/
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}

/* 
    Mobile styles (screens smaller than 768px)
*/
@media (max-width: 768px) {
    /* 
        Show the mobile menu button on small screens.
    */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-brand a {
        font-size: 1.1rem;
        /* 
            Smaller font size for the company name on mobile.
        */
    }
    
    /* 
        Hide the regular menu on mobile.
    */
    .nav-menu {
        position: fixed;
        /* 
            position: fixed removes the element from normal flow.
            It's positioned relative to the viewport.
        */
        top: 70px;
        left: -100%;
        /* 
            left: -100% moves the menu off-screen to the left.
        */
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        padding: var(--spacing-md);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        gap: var(--spacing-sm);
    }
    
    /* 
        When the menu is active (has the 'active' class), show it.
    */
    .nav-menu.active {
        left: 0;
        /* 
            left: 0 brings the menu back on screen.
        */
    }
    
    .hero {
        padding: var(--spacing-lg) 0;
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        /* 
            Stack buttons vertically on mobile.
        */
    }
    
    .btn {
        width: 100%;
        /* 
            Make buttons full width on mobile for easier tapping.
        */
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        /* 
            Single column layout on mobile for better readability.
        */
        gap: var(--spacing-sm);
    }
    
    .service-item {
        padding: var(--spacing-sm);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        /* 
            Single column layout for contact items on mobile.
        */
        gap: var(--spacing-sm);
    }
    
    .contact-item {
        padding: var(--spacing-sm);
    }
    
    .contact-icon {
        font-size: 2.5rem;
        /* 
            Slightly smaller icons on mobile.
        */
    }
}

/* 
    Small mobile styles (screens smaller than 480px)
*/
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .service-item h3 {
        font-size: 1.1rem;
    }
    
    .service-item p {
        font-size: 0.95rem;
    }
    
    .contact-item h3 {
        font-size: 1.1rem;
    }
    
    .contact-link {
        font-size: 1rem;
    }
    
    .contact-icon {
        font-size: 2rem;
    }
}

