:root {
    --correios-orange: #ff8c00;
    --correios-orange-hover: #e67e00;
    --correios-blue: #00416b;
    --correios-light-blue: #00568c;
    --correios-purple: #4D148C; /* FedEx Purple */
    --correios-purple-dark: #330066; /* Darker FedEx variant */
    --text-color: #333;
    --bg-gray: #f2f2f2;
    --white: #ffffff;
}

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

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

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

/* Gov Bar */
.gov-bar {
    background-color: #00441b;
    color: white;
    font-size: 11px;
    padding: 6px 0;
}

.gov-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-left {
    display: flex;
    gap: 15px;
}

.gov-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.gov-right {
    display: flex;
    gap: 15px;
}

.gov-right a {
    color: white;
    text-decoration: none;
}

/* Top Utility Bar */
.top-bar {
    background-color: #f8f9fa;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    color: #555;
    text-decoration: none;
    margin-right: 20px;
}

.top-links a:hover {
    color: var(--correios-blue);
}

.top-social {
    display: flex;
    gap: 15px;
}

.top-social a {
    color: #888;
    font-size: 14px;
    transition: color 0.2s;
}

.top-social a:hover {
    color: var(--correios-blue);
}

/* Header */
.main-header {
    background-color: var(--correios-purple);
    padding: 20px 0;
}

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

.logo {
    height: 40px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 8px 12px;
    width: 250px;
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--correios-orange);
}

.btn-login {
    background-color: var(--correios-orange);
    color: var(--white);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.btn-login:hover {
    background-color: var(--correios-orange-hover);
    transform: translateY(-1px);
}

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

/* Navigation */
.main-nav {
    background-color: var(--correios-purple-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    font-weight: 500;
    transition: background 0.2s;
}

.main-nav li a:hover, .main-nav li a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Carousel Slider */
.main-carousel {
    position: relative;
    height: 400px;
    overflow: hidden;
    background-color: #000;
}

.carousel-container {
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 1.5s ease-out;
    display: flex;
    align-items: center;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
}

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
}

.slide-caption {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
}

.slide-caption h2 {
    font-size: 42px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.slide-caption p {
    font-size: 18px;
    margin-bottom: 25px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s;
    backdrop-filter: blur(5px);
}

.carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicators .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicators .dot.active {
    background: var(--correios-orange);
    width: 30px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .main-carousel {
        height: 300px;
    }
    .slide-caption h2 {
        font-size: 28px;
    }
    .slide-caption p {
        font-size: 16px;
    }
    .carousel-controls {
        display: none;
    }
}

/* Hero Section */
.hero {
    padding: 40px 0;
    background-color: var(--bg-gray);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(300px, 450px) 1fr;
    gap: 30px;
    align-items: start;
}

.services-tabs {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tab-header {
    display: flex;
    background: #f8f8f8;
}

.tab-btn {
    flex: 1;
    border: none;
    padding: 15px 10px;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn.active {
    color: var(--correios-blue);
    border-bottom-color: var(--correios-blue);
    background: white;
}

.tab-content {
    padding: 25px;
}

.panel {
    display: none;
}

.panel.active {
    display: block;
}

.panel h3 {
    margin-bottom: 10px;
    color: var(--correios-blue);
}

.panel p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--correios-orange);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: var(--correios-orange-hover);
}

.btn-primary.full-width {
    width: 100%;
}

.btn-secondary {
    display: inline-block;
    background-color: var(--correios-orange);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    transition: background 0.2s, transform 0.1s;
}

.btn-secondary:hover {
    background-color: var(--correios-orange-hover);
    transform: translateY(-2px);
}

.hero-banner img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Quick Links */
.quick-links {
    padding: 60px 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

.link-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    cursor: pointer;
}

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

.link-card img, .link-card .icon-placeholder {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    object-fit: contain;
}

.link-card .icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--correios-blue);
}

.link-card h4 {
    color: var(--correios-blue);
    margin-bottom: 10px;
}

.link-card p {
    font-size: 14px;
    color: #777;
}

/* Business Promo */
.business-promo {
    background-color: var(--correios-blue);
    color: white;
    padding: 80px 0;
    margin: 40px 0;
}

.business-content {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.business-text {
    flex: 1;
}

.business-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--correios-yellow);
}

.business-text p {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.check-list {
    list-style: none;
    margin-bottom: 30px;
}

.check-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-list i {
    color: var(--correios-orange);
}

.business-visual {
    font-size: 150px;
    color: rgba(255, 255, 255, 0.1);
}

/* App Section */
.app-section {
    padding: 80px 0;
    background: #fdfdfd;
}

.app-grid {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

.app-image img {
    width: 200px;
    height: auto;
}

.app-info h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--correios-blue);
}

.app-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.store-btn {
    background: #333;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* News Section */
.news-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.view-all {
    color: var(--correios-blue);
    text-decoration: none;
    font-weight: bold;
}

.section-title {
    color: var(--correios-blue);
    position: relative;
    padding-bottom: 10px;
    font-size: 28px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--correios-orange);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.news-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.news-img {
    width: 150px;
    flex-shrink: 0;
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 12px;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.news-item h4 {
    margin-bottom: 10px;
    color: var(--correios-blue);
}

/* Footer */
.main-footer {
    color: white;
    border-top: 5px solid var(--correios-orange);
}

.footer-top {
    background-color: var(--correios-purple);
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--correios-orange);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

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

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

.footer-col ul a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: white;
    font-size: 20px;
}

.footer-bottom {
    background-color: var(--correios-purple-dark);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-banner {
        order: -1;
    }

    .business-content {
        gap: 30px;
        text-align: center;
    }

    .business-visual {
        display: none;
    }

    .check-list {
        display: inline-block;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .gov-bar .gov-left a:nth-child(n+3) {
        display: none;
    }

    /* Header adjustments */
    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        color: white;
    }

    /* Mobile nav behavior: hidden by default, shown when body has .nav-open */
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--correios-purple-dark);
        z-index: 1500;
        border-top: 1px solid rgba(255,255,255,0.05);
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }

    body.nav-open .main-nav {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li a {
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.03);
    }

    /* Carousel smaller on phones */
    .main-carousel {
        height: 280px;
    }

    .slide-caption {
        max-width: 100%;
        padding: 0 15px;
    }

    .slide-caption h2 {
        font-size: 20px;
    }

    .slide-caption p {
        font-size: 13px;
    }

    .carousel-controls {
        display: none;
    }

    /* Hero layout stacks */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hero-banner {
        order: -1;
    }

    .hero-grid .services-tabs {
        margin-top: 0;
    }

    .tab-header {
        gap: 6px;
    }

    .tab-btn {
        padding: 12px 8px;
        font-size: 12px;
    }

    /* Quick links and news adapt */
    .links-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        flex-direction: column;
    }

    .news-img {
        width: 100%;
        height: 150px;
    }

    /* App section stacks */
    .app-grid {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .app-image img {
        margin: 0 auto;
    }

    /* Buttons and inputs expand */
    .search-box input {
        width: 140px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group input,
    .btn-primary {
        width: 100%;
    }

    /* Footer compact */
    .footer-top {
        padding: 30px 0;
    }

    .footer-grid {
        gap: 20px;
    }

    /* Make images and banners fluid */
    img, .hero-banner img, .app-image img {
        max-width: 100%;
        height: auto;
    }
}