/* ===== Global Styles ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    
    --font-main: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section {
    margin: 0; /* reset */
    padding: 5rem 0; /* original padding */
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    text-align: center;
}

.article-section {
  margin: 40px !important;
  background-color: #f9fafb; /* a light background to visualize */
     --base-spacing: 1.5rem; /* Control all spacing from one variable */
    line-height: 1.6;
}

.bg-light {
    background-color: var(--light-gray);
}

.bg-dark {
    background-color: var(--darker);
    color: white;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

/* ===== Header Styles ===== */
.main-header {
    position: sticky;
    top: 0;
    background-color: white;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* ===== Hero Section ===== */
/* Updated Hero Section */
.hero {
    position: relative;
    height: 60vh; /* Reduced from padding-based height */
    min-height: 500px; /* Ensures it doesn't get too small on mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Animated Background Elements */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.15) 0%, transparent 25%);
    animation: pulse 15s ease infinite alternate;
}

/* Binary Code Animation (Tech-themed) */
.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(transparent 95%, rgba(59, 130, 246, 0.1) 95%),
        linear-gradient(90deg, transparent 95%, rgba(59, 130, 246, 0.1) 95%);
    background-size: 30px 30px;
    opacity: 0.3;
    animation: scan 8s linear infinite;
}

/* Content Styling */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 2.8rem; /* Slightly smaller heading */
    margin-bottom: 1.2rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero .subtitle {
    font-size: 1.1rem; /* Slightly smaller subtitle */
    max-width: 600px; /* Tighter width */
    margin: 0 auto 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        height: 70vh; /* Taller on mobile for better visibility */
        min-height: 400px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem 0; /* Even more compact on mobile */
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        height: 70vh; /* Taller on mobile for better visibility */
        min-height: 400px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Category Cards ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.category-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.category-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.card-link {
    font-weight: 600;
    color: var(--primary);
}

.ai-card .category-icon {
    color: #10b981;
}

.security-card .category-icon {
    color: #ef4444;
}

.tools-card .category-icon {
    color: #f59e0b;
}

/* ===== Article Cards ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all {
    font-weight: 600;
    color: var(--primary);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.category {
    font-weight: 600;
    color: var(--primary);
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card p {
    margin-bottom: 1.25rem;
    color: var(--gray);
}

.read-more {
    font-weight: 600;
    color: var(--primary);
}

/* ===== Tools Section ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.tool-card h3 {
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--gray);
    margin-bottom: 1.25rem;
}

.tool-link {
    font-weight: 600;
    color: var(--primary);
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ===== Newsletter ===== */
.newsletter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    opacity: 0.9;
    max-width: 400px;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-family: inherit;
}

/* ===== Modern Tech Footer ===== */
.main-footer {
    position: relative;
    background-color: var(--darker);
    color: white;
    padding: 5rem 0 0;
    overflow: hidden;
}

/* Animated Circuit Pattern Background */
.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 75% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        linear-gradient(to right, 
            transparent 0%, 
            rgba(16, 185, 129, 0.05) 50%, 
            transparent 100%);
    animation: circuitFlow 20s linear infinite;
}

/* Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

/* About Section */
.footer-about {
    position: relative;
}

.footer-about .logo {
    width: 160px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-about p {
    margin: 1rem 0;
    opacity: 0.8;
    line-height: 1.7;
    max-width: 300px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.social-links a:hover::after {
    opacity: 1;
}

.social-links i {
    position: relative;
    z-index: 2;
}

/* Footer Links */
.footer-links h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 3px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
}

.footer-links li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.9em;
}

.footer-links a {
    opacity: 0.8;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.2rem 0;
}

.footer-links a:hover {
    opacity: 1;
    color: white;
    transform: translateX(5px);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
}

/* Animations */
@keyframes circuitFlow {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-footer {
        padding: 3rem 0 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-about p {
        max-width: 100%;
    }
    
    .footer-links h3 {
        font-size: 1.2rem;
    }
    
    .social-links a {
        width: 38px;
        height: 38px;
    }
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .header-grid {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        gap: 1rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }

}


/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 280px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 100;
    padding: 1rem;
    left: -50px;
    top: 100%;
}

.dropdown:hover .dropdown-content {
    display: flex;
}

.dropdown-section {
    padding: 0 1rem;
    flex: 1;
}

.dropdown-section h4 {
    color: var(--primary);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.dropdown-content a {
    display: block;
    color: var(--dark);
    padding: 0.5rem 0;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown > a i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.dropdown:hover > a i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        box-shadow: none;
        display: none;
        width: 100%;
        padding: 0;
    }
    
    .dropdown:hover .dropdown-content,
    .dropdown:focus-within .dropdown-content {
        display: block;
    }
    
    .dropdown-section {
        padding: 0.5rem 1rem;
    }
}
.dropdown-title {
    cursor: default;
    /* other styles to match your design */
}

.section-header {
    display: block;
    /* other styles to match your design */
}

.section-header h4 {
    margin: 0;
    /* other styles to match your design */
}
