/* ========================================
   InfraCore Logic - Main Stylesheet
   ======================================== */

/* Root Variables */
:root {
    --primary-green: #2d7a4f;
    --primary-dark: #1d5136;
    --primary-light: #3fa068;
    --secondary-grey: #4a5568;
    --light-grey: #e2e8f0;
    --dark-grey: #2d3748;
    --text-dark: #1a202c;
    --text-light: #718096;
    --white: #ffffff;
    --background: #f7fafc;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* 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;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 400;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 122, 79, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1d5136 0%, #2d7a4f 100%);
    color: var(--white);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.1) 10px, rgba(255,255,255,.1) 20px);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero .tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.hero .description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background-color: var(--white);
    color: var(--primary-green);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-hero-primary:hover {
    background-color: rgba(255,255,255,0.9);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

.btn-hero-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-hero-secondary:hover {
    background-color: var(--white);
    color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

/* Capabilities Grid */
.capabilities {
    padding: 5rem 0;
    background-color: var(--white);
}

.capabilities h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.capability-tile {
    background-color: var(--background);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--light-grey);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.capability-tile:hover,
.capability-tile:focus {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(45, 122, 79, 0.2);
    border-color: var(--primary-green);
    outline: none;
}

.tile-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.capability-tile h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.tile-preview {
    color: var(--text-light);
}

.tile-expanded {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: var(--transition);
}

.capability-tile:hover .tile-expanded,
.capability-tile:focus .tile-expanded {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
}

.tile-expanded img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Integration Focus */
.integration-focus {
    padding: 5rem 0;
    background-color: var(--background);
}

.integration-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.integration-text h2 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

.integration-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Statistics */
.statistics {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.statistics h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Call to Action */
.cta {
    padding: 5rem 0;
    background-color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background-color: var(--dark-grey);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3, .footer h4 {
    margin-bottom: 1rem;
}

.footer-tagline {
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-address {
    opacity: 0.8;
    line-height: 1.8;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--white);
    opacity: 0.8;
}

.footer a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-green);
}

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

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-grey);
    color: var(--white);
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 2000;
    display: none;
}

.cookie-consent.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
}

.cookie-content a {
    color: var(--primary-light);
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

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

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse > * {
    direction: ltr;
}

.content-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.large-text {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Service Section */
.service-section {
    padding: 4rem 0;
}

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

.service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.service-content.reverse {
    direction: rtl;
}

.service-content.reverse > * {
    direction: ltr;
}

.service-text h2 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.service-features {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.service-features li {
    margin-bottom: 0.5rem;
}

.service-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

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

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-category {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.blog-content h2, .blog-content h3 {
    margin-bottom: 0.5rem;
}

.blog-content h2 a, .blog-content h3 a {
    color: var(--text-dark);
}

.blog-content h2 a:hover, .blog-content h3 a:hover {
    color: var(--primary-green);
}

.read-more {
    color: var(--primary-green);
    font-weight: 500;
    display: inline-block;
    margin-top: 1rem;
}

.read-more:hover {
    transform: translateX(5px);
}

/* Blog Article */
.blog-article {
    background-color: var(--white);
}

.article-header {
    background-color: var(--background);
    padding: 2rem 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-hero {
    height: 400px;
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 3rem 0;
}

.article-content .container {
    max-width: 800px;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--secondary-grey);
    margin-bottom: 2rem;
}

.article-content h2 {
    color: var(--primary-green);
    margin-top: 2rem;
}

.article-content h3 {
    margin-top: 1.5rem;
}

.article-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-cta {
    background-color: var(--background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 3rem;
}

.article-cta h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.related-articles {
    padding: 4rem 0;
    background-color: var(--background);
}

.related-articles h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.related-articles .blog-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.contact-details {
    margin: 2rem 0;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-image {
    margin-top: 2rem;
}

.contact-image img {
    width: 100%;
    border-radius: 12px;
}

/* Contact Form */
.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-grey);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

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

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: block;
}

.success-message {
    background-color: #c6f6d5;
    color: #22543d;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Map Section */
.map-section {
    padding: 4rem 0;
    background-color: var(--background);
}

.map-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Legal Content */
.legal-content {
    padding: 4rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--primary-green);
    margin-top: 2rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
}

.faq-category {
    margin-bottom: 3rem;
}

.faq-category h2 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-grey);
}

.faq-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.faq-question {
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-green);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-cta {
    background-color: var(--background);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 3rem;
}

.faq-cta h2 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu.active {
        max-height: 500px;
    }
    
    .nav-menu li {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--light-grey);
    }
    
    .hero {
        min-height: 70vh;
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .tagline {
        font-size: 1.2rem;
    }
    
    .hero .description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
    
    .integration-content,
    .content-grid,
    .service-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
