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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Header Styles */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #f8f9fa;
    padding: 8px 0;
    font-size: 12px;
    text-align: center;
    color: #666;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #2c5530;
}

.logo h1 {
    color: #2c5530;
    font-size: 24px;
    font-weight: normal;
    margin-left: 20px;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2c5530;
    border-bottom: 2px solid #2c5530;
}

.search-bar {
    visibility: hidden; /*temp hidden search bar, will enable it later */
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 8px 20px;
    width: 300px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.search-bar button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

/* Hero Styles */
.hero {
    background: url('https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') center/cover no-repeat;
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: 300;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #2c5530;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Main Content */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.featured-section h2 {
    color: #2c5530;
    margin-bottom: 30px;
    font-size: 2.2em;
    border-bottom: 3px solid #2c5530;
    padding-bottom: 10px;
}

.featured-section .mortgage-calculator h2 {
    color: #2c5530;
}

/* Mortgage Calculator */
.mortgage-calculator {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.mortgage-calculator h2 {
    color: #2c5530;
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
}

.calculator-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;           /* ADDED */
    align-items: center;     /* ADDED */
    gap: 15px;              /* ADDED */
}

.form-group label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;     /* ADDED */
    min-width: 120px;        /* ADDED */
    flex-shrink: 0;          /* ADDED */
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #2c5530;
}

.calculate-btn {
    background: #2c5530;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-top: 20px;
}

.calculate-btn:hover {
    background: #1e3a22;
}

.results-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.result-label {
    font-weight: 500;
    color: #333;
}

.result-value {
    font-weight: bold;
    color: #2c5530;
    font-size: 18px;
}

/* Categories Section */
.categories-section {
    margin-bottom: 50px;
}

.categories-section h3 {
    color: #2c5530;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.category-item:hover {
    background: #2c5530;
    color: white;
    transform: scale(1.05);
}

.category-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    height: fit-content;
}

.sidebar h3 {
    color: #888;
    margin-bottom: 20px;
    font-size: 2em;
    font-family: 'Brush Script MT', cursive;

}

.trending-list {
    list-style: none;
}

.trending-item {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.trending-item a:hover {
    color: #2c5530;
}

.trending-number {
    color: #2c5530;
    font-weight: bold;
    margin-right: 10px;
}

/* Newsletter */
.newsletter {
    background: #2c5530;
    color: white;
    padding: 50px 0;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.newsletter h3 {
    font-size: 2em;
    margin-bottom: 15px;
}

.newsletter p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 25px;
    outline: none;
}

.newsletter-form button {
    background: #fff;
    color: #2c5530;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
           position: relative;
           flex-direction: row;
           justify-content: space-between;
           align-items: center;
           height: 80px;
           padding: 0 20px;
       }

       /* Show hamburger menu on mobile */
       .hamburger {
           display: flex !important;
           order: 3;
           z-index: 1001;
           position: relative;
       }

       /* Logo positioning */
       .logo {
           order: 1;
           z-index: 1001;
       }

       /* Hide search bar on mobile */
       .search-bar {
           display: none;
       }

       /* Mobile navigation menu - HIDDEN BY DEFAULT */
       .nav-menu {
           position: absolute;
           top: 100%;
           left: 0;
           right: 0;
           width: 100%;
           background: white;
           flex-direction: column;
           padding: 0;
           margin: 0;
           box-shadow: 0 4px 15px rgba(0,0,0,0.15);
           border-top: 1px solid #e0e0e0;
           
           /* Hidden state */
           transform: translateY(-10px);
           opacity: 0;
           visibility: hidden;
           max-height: 0;
           overflow: hidden;
           
           /* Smooth transition */
           transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
           
           gap: 0;
           z-index: 1000;
       }

       /* SHOW menu when active class is added */
       .nav-menu.active {
           transform: translateY(0);
           opacity: 1;
           visibility: visible;
           max-height: 500px;
           padding: 20px 0;
       }

       /* Mobile menu list items */
       .nav-menu li {
           margin: 0;
           padding: 0;
           width: 100%;
           list-style: none;
       }

       /* Mobile menu links */
       .nav-menu a {
           display: block;
           padding: 15px 20px;
           color: #333;
           font-weight: 500;
           text-decoration: none;
           border-bottom: 1px solid #f0f0f0;
           transition: all 0.2s ease;
       }

       /* Mobile menu link hover */
       .nav-menu a:hover {
           color: #2c5530;
           background-color: #f8f9fa;
           padding-left: 30px;
       }

       /* Remove border from last item */
       .nav-menu li:last-child a {
           border-bottom: none;
       }

       /* Hero responsive */
       .hero h1 {
           font-size: 2.5em;
       }

       /* Main content responsive */
       .main-container {
           grid-template-columns: 1fr;
           gap: 30px;
           padding: 40px 20px;
       }

       /* Categories responsive */
       .categories-grid {
           grid-template-columns: 1fr;
       }

       /* Footer responsive */
       .footer-content {
           grid-template-columns: repeat(2, 1fr);
           gap: 20px;
       }

       /* Newsletter responsive */
       .newsletter-form {
           flex-direction: column;
       }

       /* Calculator responsive */
       .calculator-form {
           grid-template-columns: 1fr;
           gap: 20px;
       }

       .form-group {                    /* ADDED */
           flex-direction: column;      /* ADDED */
           align-items: flex-start;     /* ADDED */
           gap: 8px;                    /* ADDED */
       }                                /* ADDED */

       .form-group label {              /* ADDED */
           min-width: auto;             /* ADDED */
       }                                /* ADDED */

       .mortgage-calculator {
           padding: 20px;
       }
   }
