/* ========================================
   Guinchos Acredita - Estilos Principais
   ======================================== */

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

:root {
    --primary-color: #1a1a2e;
    --accent-color: #ffc107;
    --secondary-color: #0f3460;
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
}

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

/* ========== HEADER E NAVEGAÇÃO ========== */

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

.contact-header {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.whatsapp-menu-item {
    display: none;
}

.contact-header a {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.contact-header a:hover {
    background: #ffb300;
    transform: translateY(-2px);
}

/* ========== HERO SECTION ========== */

.hero {
    background: linear-gradient(rgba(26, 26, 46, 0.7), rgba(26, 26, 46, 0.7)), 
                url('../images/logo-principal.jpg') center/cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--white);
    padding: 110px 40px;
    text-align: center;
    min-height: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: min(var(--hero-title-size-desktop), 9vw);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInDown 0.8s ease;
    max-width: 100%;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: break-word;
}

.hero p {
    font-size: var(--hero-subtitle-size-desktop);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.8s ease;
    max-width: min(100%, 900px);
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 992px) {
    .hero {
        padding: 90px 25px;
        min-height: 420px;
    }
    .hero h1 {
        font-size: min(var(--hero-title-size-mobile), 10vw);
    }
    .hero p {
        font-size: var(--hero-subtitle-size-mobile);
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 80px 18px;
        min-height: 380px;
    }
    .hero h1 {
        font-size: min(var(--hero-title-size-mobile), 12vw);
        word-break: break-word;
    }
    .hero p {
        font-size: calc(var(--hero-subtitle-size-mobile) * 0.95);
    }
}

.cta-button {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: var(--cta-text-size);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.cta-button:hover {
    background: #ffb300;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ========== CONTAINER GERAL ========== */

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

/* ========== SEÇÕES ========== */

section {
    padding: 60px 20px;
}

section h2 {
    font-size: clamp(2rem, 4vw, var(--section-heading-size));
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

section h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.6rem);
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

body,
section p,
.card p,
.service-content p,
.contact-item p {
    font-size: var(--body-text-size);
}

/* ========== CARDS ========== */

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

.card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    color: #666;
    line-height: 1.8;
}

/* ========== SERVIÇOS ========== */

.services {
    background: var(--light-bg);
}

.service-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.service-item:nth-child(even) {
    flex-direction: row-reverse;
}

.service-content {
    flex: 1;
}

.service-image {
    flex: 1;
    max-width: 400px;
}

.service-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ========== CONTATO ========== */

.contact-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.contact-section h2 {
    color: var(--white);
}

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

.contact-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.contact-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* ========== FOOTER ========== */

footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    border-top: 3px solid var(--accent-color);
}

footer p {
    margin: 0.5rem 0;
}

.footer-links {
    margin: 1rem 0;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

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

/* ========== ADMIN PAINEL ========== */

.dashboard-wrapper {
    background: #f8f9fa;
    min-height: 100vh;
}

.sidebar {
    background: #1a1a2e;
    color: white;
    padding: 2rem 0;
    min-height: 100vh;
    position: fixed;
    width: 250px;
    left: 0;
    top: 0;
    overflow-y: auto;
}

.sidebar h2 {
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #ffc107;
    /*margin-bottom: 1rem;*/
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
    background: #0f3460;
    border-left-color: #ffc107;
    padding-left: 1.5rem;
}

.sidebar ul li a.active {
    background: #0f3460;
    border-left-color: #ffc107;
}

.main-content {
    margin-left: 250px;
    padding: 2rem;
}

.admin-header {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    color: #1a1a2e;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info .dashboard-link {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    padding: 0;
    background: transparent;
}

.user-info .dashboard-link:hover {
    color: #0f3460;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

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

.admin-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.metric-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.8rem;
    border-radius: 18px;
    color: #1a1a2e;
}

.metric-card .metric-icon {
    font-size: 2rem;
    color: #ffc107;
}

.metric-card h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.metric-card .metric-value {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0;
}

.metric-card small {
    color: #5a5a5a;
}

.admin-card h2 {
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #1a1a2e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 5px rgba(255, 193, 7, 0.3);
}

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

.form-group.password-group {
    position: relative;
}

.form-group.password-group input {
    padding-right: 3rem;
}

.form-group.password-group .password-toggle {
    position: absolute;
    right: 0.8rem;
    top: 73%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    outline: none;
}

.form-group.password-group .password-toggle i {
    display: block;
}

.form-group.password-group .password-toggle:focus {
    outline: none;
    box-shadow: none;
}

.form-group.password-group .password-toggle:hover {
    color: var(--secondary-color);
}

.color-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input input[type="color"] {
    width: 50px;
    height: 40px;
    cursor: pointer;
}

.color-input input[type="text"] {
    flex: 1;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ffc107;
    color: #1a1a2e;
    width: 100%;
}

.btn-primary:hover {
    background: #ffb300;
    transform: translateY(-2px);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== LOGIN ========== */

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.login-container p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: #ffc107;
    color: #1a1a2e;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-info {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #004085;
}

/* ========== ANIMAÇÕES ========== */

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

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

/* ========== RESPONSIVO ========== */

/* Estilos para o Menu Sanduíche */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0 15px;
    }

    .logo {
        flex: 1;
        text-align: left;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-color);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        z-index: 1000;
        overflow-y: auto;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 0 0 0;
        margin: 0;
    }

    nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.5rem;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        font-size: 1.1rem;
        display: block;
        padding: 0.75rem 0;
        color: var(--white);
        text-decoration: none;
        transition: color 0.2s ease;
    }

    nav ul li a:hover {
        color: var(--accent-color);
    }

    .whatsapp-menu-item a {
        font-weight: 700;
        color: var(--accent-color);
    }

    .hero {
        padding: 80px 20px;
        min-height: 55vh;
        max-height: 70vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .service-item,
    .service-item:nth-child(even) {
        flex-direction: column;
    }

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

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        min-height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .contact-header {
        display: none;
    }

    .whatsapp-menu-item {
        display: list-item;
    }

    .hero .container,
    .services .container,
    .service-item,
    .service-content,
    .contact-grid,
    .cards-grid,
    .card,
    .contact-item {
        text-align: center;
    }

    .service-item {
        align-items: center;
    }

    .contact-item {
        justify-content: center;
    }

    .hero h1,
    .hero p,
    .cta-button {
        margin-left: auto;
        margin-right: auto;
    }

    section h2,
    section h3,
    .card h3 {
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }

    section h2 {
        font-size: 1.8rem;
    }

    section h3 {
        font-size: 1.3rem;
    }

    .contact-header a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 30px 15px;
    }

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