/* ===================================
   EMSTAC Tech Magazine Styles
   =================================== */

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #047857;
    --accent-color: #f97316;
    --accent-secondary: #ea580c;
    --accent-light: #fb923c;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f0fdf4;
    --bg-white: #ffffff;
    --border-color: #d1fae5;
    --success-color: #10b981;
    --gradient-1: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --gradient-2: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --gradient-3: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #f97316 100%);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-white);
}

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

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-dark);
    position: relative;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.logo-fallback {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
}

.logo img[style*="display: none"] + .logo-fallback,
.logo-fallback {
    display: flex;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a:not(.btn-primary-small):hover {
    color: var(--primary-color);
}

.nav-links a:not(.btn-primary-small)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-primary-small):hover::after {
    width: 100%;
}

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

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

/* ===================================
   Buttons
   =================================== */

.btn-primary,
.btn-secondary,
.btn-primary-small,
.btn-primary-large,
.btn-secondary-large {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary,
.btn-primary-large {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary-small {
    padding: 0.5rem 1.25rem;
    background: var(--gradient-1);
    color: white;
    font-size: 0.9rem;
}

.btn-primary-small:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover,
.btn-secondary-large:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

/* ===================================
   Hero Section - Magazine Style
   =================================== */

.hero-magazine {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-magazine::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-magazine::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content-magazine {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-title-magazine {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description-magazine {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-magazine {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-stats-magazine {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat-mag {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number-mag {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label-mag {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===================================
   Section Headers
   =================================== */

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Featured Articles Section
   =================================== */

.featured-articles {
    padding: 80px 0;
    background: white;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.article-card.featured {
    grid-column: span 2;
}

.article-image {
    height: 200px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    position: relative;
}

.article-card.featured .article-image {
    height: 300px;
}

.article-category {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.article-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gradient-3);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--text-dark);
}

.article-card.featured .article-title {
    font-size: 2rem;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

/* ===================================
   Projects Showcase Section
   =================================== */

.projects-showcase {
    padding: 80px 0;
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

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

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--bg-light);
    color: var(--primary-dark);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===================================
   Innovations Section
   =================================== */

.innovations {
    padding: 80px 0;
    background: white;
}

.innovations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.innovation-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.innovation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.innovation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.innovation-emoji {
    font-size: 2.5rem;
}

.innovation-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.innovation-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===================================
   Careers Section
   =================================== */

.careers {
    padding: 80px 0;
    background: var(--bg-light);
}

.toggle-careers-btn {
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.toggle-careers-btn .btn-icon {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.toggle-careers-btn.active .btn-icon {
    transform: rotate(180deg);
}

.careers-content {
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 3rem;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.careers-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.careers-intro h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
}

.benefit-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.benefit-item h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.benefit-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.application-form-container {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.application-form-container h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-dark);
}

.form-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.application-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-field .form-input,
.form-field .form-textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-field .form-input:focus,
.form-field .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-field select.form-input {
    cursor: pointer;
}

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

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.form-actions .btn-primary {
    padding: 1rem 3rem;
    font-size: 1.125rem;
}

.form-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    min-height: 20px;
    text-align: center;
}

.form-note.success {
    color: var(--success-color);
}

.form-note.error {
    color: var(--accent-secondary);
}

/* ===================================
   Subscribe Section
   =================================== */

.subscribe {
    padding: 80px 0;
    background: var(--gradient-1);
}

.subscribe-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.subscribe-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.subscribe-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.subscribe-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 0.5rem;
}

.form-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.subscribe-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.logo-image-footer {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-fallback-footer {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon-footer {
    width: 50px;
    height: 50px;
    background: white;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.logo-text-footer {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
}

.footer-brand .logo img[style*="display: none"] + .logo-fallback-footer,
.logo-fallback-footer {
    display: flex;
}

.footer-tagline {
    color: #a0aec0;
}

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

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column a {
    display: block;
    color: #a0aec0;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    text-align: center;
    color: #a0aec0;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 968px) {
    .hero-stats-magazine {
        gap: 2rem;
    }
    
    .articles-grid .article-card.featured {
        grid-column: span 1;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-magazine {
        padding: 120px 0 60px;
    }
    
    .hero-title-magazine {
        font-size: 2.5rem;
    }
    
    .hero-cta-magazine {
        flex-direction: column;
    }
    
    .hero-stats-magazine {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .articles-grid,
    .projects-grid,
    .innovations-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .application-form-container {
        padding: 2rem 1.5rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title-magazine {
        font-size: 2rem;
    }
    
    .subscribe-card {
        padding: 2rem 1.5rem;
    }
    
    .subscribe-title {
        font-size: 1.75rem;
    }
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   Utility Classes
   =================================== */

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

.hidden {
    display: none;
}
