/* Madrigal Network - Main Stylesheet */

:root {
    --primary-color: #2b5a7e;
    --secondary-color: #4fa8d8;
    --accent-color: #a4d233;
    --orange-accent: #ff8847;
    --dark-blue: #1f4761;
    --light-blue: #5cb4e4;
    --lime-green: #a4d233;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --stat-red: #f08a8a;
    --stat-orange: #f5b461;
    --stat-yellow: #f7d861;
    --stat-green: #8dd598;
    --stat-cyan: #7bc4d4;
    --stat-blue: #7ba4d8;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-text span {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
}

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

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 280px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 5px;
    margin-top: 0;
    padding: 10px 0;
}

/* Keep dropdown open when hovering over parent OR dropdown itself */
.dropdown:hover .dropdown-content,
.dropdown .dropdown-content:hover {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    border-left-color: var(--lime-green);
    padding-left: 25px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3d8bc9 0%, #5cb4e4 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--lime-green);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #91ba2a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: #5cb4e4;
    border: 2px solid #5cb4e4;
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: #4fa8d8;
    border-color: #4fa8d8;
    color: var(--white);
}

/* Services Grid */
.services-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 38px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    margin-top: 40px;
}

.service-card {
    background-color: var(--white);
    padding: 60px 30px;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
}

/* Colored service boxes */
.services-grid.colored .service-card {
    color: var(--white);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.services-grid.colored .service-card:nth-child(1) {
    background-color: #2b5a7e;
}

.services-grid.colored .service-card:nth-child(2) {
    background-color: #5cb4e4;
}

.services-grid.colored .service-card:nth-child(3) {
    background-color: #a4d233;
}

.services-grid.colored .service-card:nth-child(4) {
    background-color: #a4d233;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.services-grid.colored .service-icon {
    color: var(--white);
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.services-grid.colored .service-card h3 {
    color: var(--white);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.services-grid.colored .service-card p {
    color: var(--white);
    opacity: 0.95;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--white);
}

.feature-item:nth-child(1) .feature-icon {
    background-color: #5cb4e4;
}

.feature-item:nth-child(2) .feature-icon {
    background-color: #a4d233;
}

.feature-item:nth-child(3) .feature-icon {
    background-color: #ff8847;
}

.feature-item:nth-child(4) .feature-icon {
    background-color: #2b5a7e;
}

.feature-item:nth-child(5) .feature-icon {
    background-color: #a4d233;
}

.feature-item:nth-child(6) .feature-icon {
    background-color: #ff8847;
}

.feature-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Stats Section */
.stats-section {
    background-color: var(--white);
    padding: 0;
    margin: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    text-align: center;
}

.stat-item {
    padding: 50px 20px;
    color: var(--white);
}

.stat-item:nth-child(1) {
    background-color: var(--stat-red);
}

.stat-item:nth-child(2) {
    background-color: var(--stat-orange);
}

.stat-item:nth-child(3) {
    background-color: var(--stat-yellow);
}

.stat-item:nth-child(4) {
    background-color: var(--stat-green);
}

.stat-item:nth-child(5) {
    background-color: var(--stat-cyan);
}

.stat-item:nth-child(6) {
    background-color: var(--stat-blue);
}

.stat-item .stat-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.stat-item h3 {
    font-size: 72px;
    margin-bottom: 10px;
    font-weight: 300;
    line-height: 1;
}

.stat-item p {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

/* Team Section */
.team-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-member {
    background-color: var(--white);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.team-member h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.team-member .role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
}

.team-member p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Contact Form */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 50px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

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

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: block;
        font-size: 28px;
        padding: 5px 10px;
    }
    
    .mobile-menu-toggle.active {
        color: var(--lime-green);
    }
    
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 20px;
        margin-top: 10px;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .services-grid.colored {
        grid-template-columns: 1fr !important;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item h3 {
        font-size: 48px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Page-specific styles */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.page-content {
    padding: 60px 0;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.content-section h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-light);
}

.content-section ul {
    margin-bottom: 20px;
    margin-left: 30px;
}

.content-section ul li {
    margin-bottom: 10px;
    color: var(--text-light);
}
