/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --bg-dark: #0a0a14;
    --bg-medium: #1a1a2e;
    --primary: #6f42c1;
    --primary-hover: #835dce;
    --secondary: #00e0c7;
    --text-light: #f0f0f0;
    --text-dark: #212529;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
    font-size: 16px;
}

.container { max-width: 1200px; margin: auto; padding: 0 2rem; }
.section { padding: 6rem 0; overflow-x: hidden; /* Evita scroll horizontal por AOS */ }

.section-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 4rem;
    color: white;
}
.highlight { color: var(--primary); }

.bg-light { background-color: var(--bg-medium); }
.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
}
.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}
.btn i { margin-left: 8px; }

/* --- HEADER Y NAVEGACIÓN --- */
.main-header {
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: background 0.3s ease, padding 0.3s ease;
}
.header-scrolled {
    background: rgba(10, 10, 20, 0.9);
    padding: 0.8rem 0;
}
.main-nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.8rem; color: white; text-decoration: none; }
.nav-menu { display: flex; list-style: none; }
.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    margin-left: 2.5rem;
    position: relative;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

.hamburger { display: none; cursor: pointer; }
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(45deg, #0a0a14, #1a1a2e);
}
.hero-content { position: relative; z-index: 2; }
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: #ccc;
}
.typed-cursor {
    color: var(--secondary);
    font-size: 4.5rem;
}

/* --- ABOUT SECTION --- */
.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: center;
}
.profile-pic {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.about-text .section-title { text-align: left; }
.about-text h3 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 1rem; }

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.service-card {
    background: linear-gradient(145deg, #1f1f3d, #16162d);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.service-card h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* --- RESPONSIVE DESIGN --- */
@media(max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }
    .nav-menu.active { left: 0; }
    .nav-link { margin: 1.5rem 0; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .about-content { grid-template-columns: 1fr; text-align: center; }
    .profile-pic { max-width: 250px; margin: 0 auto; }
    .about-text .section-title { text-align: center; }
}



/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: var(--bg-medium);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-image {
    position: relative;
}

.portfolio-image img {
    width: 100%;
    display: block;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(111, 66, 193, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 50px;
    transition: background-color 0.3s, color 0.3s;
}

.portfolio-link:hover {
    background-color: white;
    color: var(--primary);
}

.portfolio-link i {
    margin-right: 8px;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h5 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.portfolio-content p {
    color: #ccc;
    font-size: 0.95rem;
}


/* --- Contact Section --- */
.contact-subtitle {
    text-align: center;
    margin-top: -3rem;
    margin-bottom: 3rem;
    color: #ccc;
}

.contact-form {
    max-width: 700px;
    margin: auto;
    text-align: center; 
}

.form-group-row {
    display: flex;
    gap: 1.5rem;
}

.form-group-row input {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.3);
}

#form-message {
    text-align: center;
    margin-top: 1.5rem;
    font-weight: bold;
    padding: 1rem;
    border-radius: 8px;
    display: none; 
}

#form-message.success {
    display: block;
    background-color: rgba(0, 224, 199, 0.1);
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

#form-message.error {
    display: block;
    background-color: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    border: 1px solid #FF6B6B;
}


@media(max-width: 768px) {
    .form-group-row {
        flex-direction: column;
    }
}


/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 2rem 0;
    background-color: #0D111C;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- ESTILOS ESPECÍFICOS PARA EL DASHBOARD --- */

.dashboard-body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-light);
    line-height: 1.7;
    padding: 2rem;
}

.dashboard-container {
    max-width: 1400px;
    margin: auto;
    background-color: var(--bg-medium);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-light);
}

.logout-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: transparent;
    color: #FF6B6B;
    border: 2px solid #FF6B6B;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.logout-btn:hover {
    background-color: #FF6B6B;
    color: var(--bg-medium);
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-align: center;
}

.messages-table {
    overflow-x: auto;
}

.messages-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.messages-table th,
.messages-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-table th {
    background-color: var(--primary);
    font-family: var(--font-heading);
    color: white;
    font-weight: bold;
    white-space: nowrap;
}

.messages-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.messages-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.messages-table td {
    vertical-align: top;
}

/* Estilo para los mensajes largos */
.messages-table td:nth-child(4) {
    max-width: 400px;
    word-wrap: break-word;
}

/* Responsivo para la tabla */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-header h2 {
        font-size: 1.8rem;
    }

    .logout-btn {
        width: 100%;
        text-align: center;
    }

    .messages-table,
    .messages-table thead,
    .messages-table tbody,
    .messages-table th,
    .messages-table td,
    .messages-table tr {
        display: block;
    }
    
    .messages-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .messages-table tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    .messages-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .messages-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 1rem;
        font-weight: bold;
        text-align: left;
        color: var(--primary);
    }
    
    .messages-table td:nth-of-type(1):before { content: "Nombre"; }
    .messages-table td:nth-of-type(2):before { content: "Email"; }
    .messages-table td:nth-of-type(3):before { content: "Teléfono"; }
    .messages-table td:nth-of-type(4):before { content: "Mensaje"; }
    .messages-table td:nth-of-type(5):before { content: "Fecha"; }
}

/* --- ESTILOS ESPECÍFICOS PARA EL LOGIN --- */

.login-body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    max-width: 450px;
    width: 100%;
    background-color: var(--bg-medium);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-container h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.3);
}

.login-container .btn {
    width: 100%;
    margin-top: 1rem;
}

.login-container .btn + .btn {
    margin-top: 0.5rem;
}

.error-login {
    background-color: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    border: 1px solid #FF6B6B;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    text-align: center;
    font-weight: bold;
}

.pavas-corp-logo {
    font-family: 'Poppins', sans-serif; 
    font-size: 2rem; 
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    color: var(--text-light); 
}

.pavas-corp-logo .highlight {
    color: var(--primary); 
}

.main-logo-container {
    display: flex; 
    align-items: center; 
    text-decoration: none; 
    color: inherit; 
}

.logo-icon-box {
    width: 50px;
    height: 50px;
    background-color: black; 
	border-radius: 10px; 
	display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px; 
	position: relative;
    overflow: hidden; 
}

.logo-icon-box::before {
    content: 'P'; 
    font-family: Arial, sans-serif; 
	font-weight: bold; 
	font-size: 38px; 
	color: white; 
    line-height: 1; /* Para ayudar con la alineación vertical */
    position: relative;
    top: -2px; /* Ajuste fino de la posición vertical */
}


.logo-text-group {
    display: flex;
    flex-direction: column; /* Apilar el texto principal y el eslogan */
    align-items: flex-start; /* Alinear el texto a la izquierda */
}

.logo-main-text {
    font-family: var(--font-heading); 
    font-size: 1.7rem;
    font-weight: 900; 
    color: var(--text-light); 
    line-height: 1; 
    margin-bottom: 2px; 
}

.logo-slogan {
    font-family: var(--font-body); 
    font-size: 0.85rem; 
    color: #ccc;
    line-height: 1;
    font-style: italic; 
}

@media (max-width: 480px) {
    .logo-icon-box {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    .logo-icon-box::before {
        font-size: 30px;
        top: -1px;
    }
    .logo-main-text {
        font-size: 1.4rem;
    }
    .logo-slogan {
        font-size: 0.75rem;
    }
}

.svg-logo-icon {
    width: 50px; 
	height: 50px;
    background-color: black; 
	 border-radius: 10px;
    padding: 5px; 
}
.logo-icon-box {
    width: 60px; 
	 height: 60px;
    background-color: transparent; 
    display: flex; 
    justify-content: center;
    align-items: center;
}

.main-logo-container {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-logo-container:hover {
    transform: scale(1.05);
}

.logo-main-text {
    transition: color 0.4s ease;
}


.logo-slogan {
    transition: color 0.4s ease;
}

.main-logo-container:hover .logo-slogan {
    color: var(--primary);
}

