/* CWSoftware Homepage Styles */
:root {
    --primary-color: #007bff; /* Azul primário vibrante */
    --secondary-color: #1e2a38; /* Azul escuro quase preto */
    --accent-color: #00c6ff; /* Ciano para detalhes e gradientes */
    --text-light: #f8f9fa;
    --text-dark: #343a40;
    --bg-light: #ffffff;
    --bg-dark: #f1f5f9; /* Um cinza muito claro para seções */
    --header-height: 104px; /* altura real do navbar */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #495057;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    /* increase default heading line-height to improve multi-line spacing */
    line-height: 1.25;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    color: var(--secondary-color);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.25; /* ensure wrapped title lines have breathing room */
}

.section-subtitle {
    text-align: center;
    margin-top: -50px;
    margin-bottom: 60px;
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6; /* slightly larger for paragraph-like subtitles */
}

/* Hero Section - AUTO HEIGHT (only what's needed) */
.hero {
    background-color: var(--secondary-color);
    background-image: linear-gradient(to right, var(--secondary-color) 0%, #2c3e50 100%);
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
    /* remove forced full-viewport height so it occupies only needed space */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 0; /* reduced vertical padding so hero height matches content */
}

    /* constrain hero inner content width and add breathing space when wrapping */
    .hero > div {
        width: 100%;
        max-width: 980px;
        padding: 0 18px;
    }

    /* heading spacing inside hero */
    .hero h1,
    .hero h2 {
        font-weight: 700;
        font-size: clamp(2rem, 4.8vw, 3.2rem);
        text-shadow: 0 2px 4px rgba(0,0,0,0.25);
        line-height: 1.25; /* modest spacing */
        margin-bottom: 0.5rem;
    }

    /* paragraph spacing inside hero */
    .hero p {
        font-size: clamp(0.95rem, 2.2vw, 1.15rem);
        max-width: 720px;
        margin: 12px auto 20px auto;
        font-weight: 300;
        line-height: 1.8; /* comfortable wrapping */
    }

    .hero .logo {
        margin-bottom: 18px;
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
        max-height: 110px; /* slightly smaller so hero doesn't grow too tall */
        width: auto;
    }

.btn-custom {
    background-image: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 40px;
    color: white;
    transition: all 0.35s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.28);
}

    .btn-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(0, 198, 255, 0.35);
        color: white;
    }

/* Service Cards */
.service-card {
    border: none;
    border-radius: 15px;
    background-color: var(--bg-light);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    height: 100%;
    text-align: left;
    padding: 30px;
}

    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .service-card .icon {
        font-size: 2.5rem;
        background: -webkit-linear-gradient(45deg, var(--primary-color), var(--accent-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 20px;
    }

    .service-card .card-title {
        font-weight: 600;
        color: var(--secondary-color);
        margin-bottom: 15px;
        line-height: 1.35; /* ensure wrapped card titles have extra spacing */
    }

    .service-card .card-text {
        color: #555;
        line-height: 1.8; /* easier reading when paragraphs wrap */
    }

/* Technology & Portfolio Section */
.bg-dark-section {
    background-color: var(--bg-dark);
}

.tech-logo {
    height: 50px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

    .tech-logo:hover {
        filter: grayscale(0%);
        opacity: 1;
        transform: scale(1.1);
    }

.portfolio-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    background-color: white;
}

    .portfolio-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

.portfolio-img-container {
    background-color: #e9ecef;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.portfolio-img {
    max-height: 100px;
    width: auto;
    object-fit: contain;
}

/* Contact & Footer */
#contact {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

    #contact .section-title {
        color: var(--text-light);
    }

    #contact p {
        color: rgba(255, 255, 255, 0.8);
    }

.footer {
    background-color: #141d28;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ===== ADMIN STYLES (preservando estilos existentes) ===== */

/* Header Full Width */
.admin-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2c3e50 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    padding: 1.5rem 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .header-brand i {
        font-size: 2rem;
        color: var(--accent-color);
    }

.header-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
}

/* Breadcrumbs */
.breadcrumb-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

    .breadcrumb-item a:hover {
        color: var(--accent-color);
    }

.breadcrumb-item.active {
    color: white;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.content-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border: none;
}

    .card-header-custom h5 {
        margin: 0;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.card-body-custom {
    padding: 2rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8f9fa;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
        background: white;
    }

/* Buttons */
.btn-custom-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

    .btn-custom-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
        color: white;
    }

.btn-outline-secondary {
    border: 2px solid var(--medium-gray);
    color: var(--medium-gray);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-outline-secondary:hover {
        background: var(--medium-gray);
        color: white;
        text-decoration: none;
    }

/* Info Cards */
.info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

    .info-card h6 {
        margin: 0 0 0.5rem 0;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .info-card p {
        margin: 0;
        opacity: 0.9;
        font-size: 0.9rem;
    }

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    :root {
        --header-height: 120px; /* navbar é maior em mobile */
    }

    .hero {
        padding: 20px 0;
    }

        .hero h1 {
            font-size: 2.2rem;
        }

        .hero p {
            font-size: 1.1rem;
        }

    /* Admin styles */
    .header-content {
        padding: 1rem 0;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .card-body-custom {
        padding: 1.5rem;
    }

    .main-content {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 140px; /* navbar ainda maior em telas pequenas */
    }

    /* Admin styles */
    .header-brand {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .btn-custom-primary,
    .btn-outline-secondary {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
}
