/* Portugal Direct - NIF/NIPC Verification */
:root {
    --primary: #006600;
    --primary-dark: #004d00;
    --secondary: #FF0000;
    --accent: #FFCC00;
    --text: #333333;
    --text-light: #666666;
    --bg: #f8f9fa;
    --white: #ffffff;
    --border: #e0e0e0;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* Header */
header {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
}

.brand-flag {
    width: 40px;
    height: 28px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 20px;
}

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

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Validation Form */
.validate-form {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.validate-input-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.validate-input-row input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.validate-input-row input:focus {
    border-color: var(--primary);
}

.validate-input-row button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.validate-input-row button:hover {
    background: var(--primary-dark);
}

/* Hero Tabs */
.hero-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.hero-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.hero-tab:hover,
.hero-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Result Display */
.result-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.result-box.show {
    display: block;
}

.result-box.success {
    background: #d4edda;
    border: 1px solid var(--success);
    color: #155724;
}

.result-box.error {
    background: #f8d7da;
    border: 1px solid var(--error);
    color: #721c24;
}

/* Content Sections */
.content-section {
    background: var(--white);
    padding: 3rem;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.content-section h1 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent);
}

.content-section h2 {
    color: var(--primary-dark);
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin: 1rem 0 1rem 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Info Boxes */
.info-box {
    background: #e8f5e9;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.tip-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* FAQ Styles */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
    margin: 0.5rem 0.5rem 0.5rem 0;
}

.cta-button:hover {
    background: var(--primary-dark);
}

.cta-button-secondary {
    background: var(--secondary);
}

.cta-button-secondary:hover {
    background: #cc0000;
}

/* Ad Units */
.ad-unit {
    background: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 250px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Code blocks */
.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 20px;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.3s;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .validate-input-row {
        flex-direction: column;
    }
    
    .hero-tabs {
        flex-wrap: wrap;
    }
    
    .content-section {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .content-section h1 {
        font-size: 1.8rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}
