/* Main CSS File for Sergio Anderson's Personal Website */

/* ===== BASE STYLES ===== */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
}

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

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

ul, li {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    position: relative;
}

.underline::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40px;
    height: 4px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.header.sticky {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.menu {
    display: flex;
}

.menu li {
    margin: 0 15px;
}

.menu li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
    padding: 5px 0;
}

.menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.menu li a:hover::after,
.menu li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero h1 span {
    color: var(--primary-color);
}

.profession {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
}

.hero-text {
    font-size: 18px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

.hero-buttons {
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.9s;
    animation-fill-mode: both;
}

.hero-buttons .btn {
    margin: 0 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    animation: fadeInUp 1s ease 1.2s;
    animation-fill-mode: both;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    color: white;
    font-size: 18px;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Enhanced Hero Styles */
.typing-text {
    position: relative;
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: -8px;
    width: 1px;
    height: 100%;
    color: var(--primary-color);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.animated-text {
    height: 30px;
    margin: 15px 0;
    overflow: hidden;
}

.animated-text span {
    display: block;
    height: 100%;
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 500;
    animation: slide 8s infinite;
}

@keyframes slide {
    0%, 25% {
        transform: translateY(0);
    }
    30%, 50% {
        transform: translateY(-30px);
    }
    55%, 75% {
        transform: translateY(-60px);
    }
    80%, 100% {
        transform: translateY(-90px);
    }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    display: block;
    color: white;
    font-size: 24px;
    transition: var(--transition);
}

.scroll-down a:hover {
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 5;
    opacity: 1;
}

.about-image {
    flex: 0 0 40%;
    padding: 0 15px;
}

.img-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.img-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 5px solid var(--primary-color);
    top: 15px;
    left: 15px;
    z-index: -1;
    border-radius: 10px;
}

.about-text {
    flex: 0 0 60%;
    padding: 0 15px;
    position: relative;
    z-index: 10;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.personal-info {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.info-item {
    flex: 0 0 50%;
    margin-bottom: 15px;
}

.info-item span {
    font-weight: 600;
    color: var(--secondary-color);
}

/* ===== SKILLS SECTION ===== */
.skills {
    background-color: var(--light-color);
}

.skill-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.category {
    padding: 10px 25px;
    margin: 0 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    transition: var(--transition);
}

.category.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.skills-list {
    display: none;
}

.skills-list.active {
    display: block;
}

.skill-item {
    margin-bottom: 30px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-info h4 {
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    position: relative;
    transition: width 1s ease;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-btn {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid #eee;
    padding: 8px 20px;
    margin: 0 5px 10px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    z-index: -1;
    transition: width 0.3s ease;
}

.filter-btn:hover::before {
    width: 100%;
}

.filter-btn.active::before {
    width: 100%;
}

.filter-btn:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.filter-btn.active {
    color: white;
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    font-weight: 600;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    animation: filterSelected 0.3s ease;
}

@keyframes filterSelected {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.05);
    }
    100% {
        transform: translateY(-1px) scale(1);
    }
}

.filter-info {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.filter-info span {
    font-weight: 600;
    color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.portfolio-img {
    position: relative;
    overflow: hidden;
    height: 250px; /* Fixed height for consistent look */
}

.portfolio-img img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures images cover the area without distortion */
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: var(--transition);
}

.overlay-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.overlay-content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-view-project {
    color: white;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 20px;
    transition: var(--transition);
}

.btn-view-project:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .overlay-content {
    transform: translateY(0);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

/* ===== PORTFOLIO MODAL ===== */
.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
    position: relative;
    animation: modalFadeIn 0.5s ease;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-light);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 20px 0;
}

.modal-body h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-align: center;
}

.modal-body img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-description {
    margin-bottom: 30px;
}

.modal-description p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
}

.modal-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.detail-item {
    flex: 0 0 30%;
    margin-bottom: 20px;
}

.detail-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.detail-item p {
    font-size: 16px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .detail-item {
        flex: 0 0 100%;
    }
}

/* ===== RESUME SECTION ===== */
.resume {
    background-color: var(--light-color);
}

.resume-content {
    max-width: 800px;
    margin: 0 auto;
}

.resume-download {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.resume-download p {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.resume-download .btn {
    margin: 0 10px 10px;
    min-width: 180px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.resume-download .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.resume-download .btn:hover::before {
    left: 100%;
}

.resume-download .btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.resume-download .btn:disabled:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.resume-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.resume-section {
    flex: 0 0 48%;
    margin-bottom: 30px;
}

.resume-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 30px;
    position: relative;
}

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

.resume-item {
    position: relative;
    padding-left: 20px;
    padding-bottom: 30px;
    border-left: 2px solid var(--primary-color);
}

.resume-item::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    left: -7px;
    top: 5px;
}

.resume-item:last-child {
    padding-bottom: 0;
}

.resume-item h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.resume-meta {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.resume-place {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.resume-desc {
    color: var(--text-light);
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    opacity: 1;
}

.contact-info {
    flex: 0 0 40%;
    padding: 0 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 24px;
    flex-shrink: 0;
}

.contact-item .details h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.contact-form {
    flex: 0 0 60%;
    padding: 35px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px 14px 50px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background-color: #f8f9fa;
    font-size: 16px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.form-group input:hover,
.form-group textarea:hover {
    background-color: #f2f4f6;
    border-color: #d8d8d8;
}

.form-group textarea {
    height: 160px;
    resize: none;
    padding-top: 16px;
    line-height: 1.5;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    background-color: #fff8f8;
}

.form-group input.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #2ecc71;
    background-color: #f0fff4;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    outline: none;
    background-color: #fff;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 40px;
    color: var(--primary-color);
    font-size: 18px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.form-group input:focus + .input-icon,
.form-group textarea:focus + .input-icon {
    color: var(--primary-color);
    opacity: 1;
}

.textarea-icon {
    top: 40px;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    border: none;
    color: white;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.contact-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.contact-form button:active {
    transform: translateY(0);
}

.contact-form button i {
    font-size: 18px;
}

.about, .contact {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section#about, .section#contact {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: auto !important;
    padding: 120px 0 !important;
}

@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }
    
    .about-image, .about-text {
        flex: 0 0 100%;
        margin-bottom: 40px;
    }
    
    .resume-section {
        flex: 0 0 100%;
    }
    
    .contact-info, .contact-form {
        flex: 0 0 100%;
    }
    
    .contact-info {
        margin-bottom: 40px;
    }
    
    .contact-form {
        padding: 30px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-200%);
        transition: var(--transition);
    }
    
    .menu.active {
        transform: translateY(0);
    }
    
    .menu li {
        margin: 10px 0;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 28px;
    }
    
    .hero h1 {
        font-size: 30px;
    }
    
    .profession {
        font-size: 20px;
    }
    
    .hero-text {
        font-size: 16px;
    }
    
    .hero-buttons .btn {
        margin-bottom: 10px;
    }
    
    .info-item {
        flex: 0 0 100%;
    }
    
    .skill-categories {
        flex-direction: column;
    }
    
    .category {
        margin-bottom: 10px;
    }
    
    /* Improve touch targets for mobile users */
    .menu li a,
    .btn,
    .filter-btn,
    .form-group input,
    .cookie-btn {
        padding: 12px 16px;  /* Minimum 44x44px touch target size */
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve mobile form experience */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input, 
    .form-group textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Improve cookie banner on mobile */
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        margin-bottom: 10px;
        width: 100%;
    }
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: visible;
    padding: 80px 0;
}

/* Testimonials Grid Layout */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Load More Button */
.testimonials-load-more {
    text-align: center;
    margin-top: 3rem;
    grid-column: 1/-1;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    border: 2px solid var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #2980b9, var(--primary-color));
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #bdc3c7;
    border-color: #95a5a6;
    box-shadow: none;
}

.load-more-btn i {
    margin-left: 0.5rem;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    border: 3px solid var(--primary-color);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar img {
    transform: scale(1.05);
}

.testimonial-author-info h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary-color);
    line-height: 1.2;
}

.testimonial-author-info p {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    margin: 0;
}

.testimonial-content {
    position: relative;
}

.testimonial-quote {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    font-style: italic;
    position: relative;
    padding: 0 20px;
    margin-bottom: 20px;
}

.testimonial-quote::before {
    content: '\201C';
    font-family: Georgia, serif;
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 60px;
    color: rgba(52, 152, 219, 0.2);
    line-height: 1;
}

.testimonial-quote::after {
    content: '\201D';
    font-family: Georgia, serif;
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-size: 60px;
    color: rgba(52, 152, 219, 0.2);
    line-height: 1;
}

.testimonial-rating {
    display: flex;
    margin-top: 20px;
    justify-content: center;
}

.testimonial-rating .star {
    color: #ffd700;
    font-size: 18px;
    margin: 0 2px;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 20px;
}

.testimonials-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-top: 10px;
    font-weight: 400;
}

.testimonials-view-toggle {
    text-align: center;
    margin-top: 40px;
}

.view-toggle-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.view-toggle-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.view-toggle-btn.active {
    background: var(--secondary-color);
}

/* Legacy support for old carousel */
.testimonials-slider {
    display: none;
}

.testimonial-controls {
    display: none;
}

/* Responsive design */
@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 25px;
    }
    
    .testimonial-quote {
        font-size: 15px;
    }
    
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
    
    .testimonial-author-info h4 {
        font-size: 16px;
    }
    
    .load-more-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .testimonials-grid {
        gap: 15px;
    }
    
    .testimonial-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .testimonial-quote {
        font-size: 15px;
        padding: 0 15px;
    }
}

.loading-testimonials i {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.testimonial-item {
    display: none; /* Hide by default, shown via JavaScript */
    flex: 0 0 100%;
    width: 100%;
    transition: transform 0.5s ease;
    padding: 20px;
}

.testimonial-item.active {
    display: block;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    margin-right: 20px;
}

.language-switcher select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--secondary-color);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.language-switcher select:hover {
    border-color: var(--primary-color);
}

.language-switcher select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

/* Simplified Animation for scroll reveal */
.section {
    overflow: visible;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.animate-on-scroll {
    /* Start visible by default */
    opacity: 1;
    transition: transform 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.about-text, .contact-form {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Add delay to staggered animations */
.animate-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}

.animate-on-scroll:nth-child(3) {
    transition-delay: 0.4s;
}

.animate-on-scroll:nth-child(4) {
    transition-delay: 0.6s;
}

.animate-on-scroll:nth-child(5) {
    transition-delay: 0.8s;
}

body.loaded .section {
    visibility: visible !important;
    opacity: 1 !important;
}

body.loaded .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
}

.form-alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

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

.form-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.15);
}

.form-success i {
    margin-right: 10px;
    font-size: 20px;
    color: #2ecc71;
}

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

@media (max-width: 768px) {
    .language-switcher {
        margin-right: 20px;
        z-index: 1001;
        position: relative;
    }
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    align-items: center;
}

.loader .circle {
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 15px;
    height: 15px;
    margin: 0 5px;
    animation: bounce 1.5s infinite ease-in-out;
}

.loader .circle:nth-child(1) {
    animation-delay: 0s;
}

.loader .circle:nth-child(2) {
    animation-delay: 0.3s;
}

.loader .circle:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-5px);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 9999;
}

.form-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.15);
}

.form-success i {
    margin-right: 10px;
    font-size: 20px;
    color: #2ecc71;
}

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

/* ===== FOOTER SECTION ===== */
.footer {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 50px 0 20px;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-logo h2 {
    font-size: 28px;
    color: var(--light-color);
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-social a {
    color: var(--light-color);
    margin-left: 15px;
    font-size: 18px;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--light-color);
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo {
        margin-bottom: 20px;
    }
    
    .footer-social a {
        margin: 0 8px;
    }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(45, 45, 45, 0.95);
    color: white;
    padding: 15px 0;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s forwards;
}

.cookie-banner.hiding {
    animation: slideDown 0.5s forwards;
}

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

.cookie-text {
    flex: 1 0 60%;
}

.cookie-text h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.cookie-text p {
    font-size: 14px;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background-color: var(--primary-color);
    color: white;
}

.cookie-btn.accept:hover {
    background-color: #2980b9;
}

.cookie-btn.reject {
    background-color: #f1f1f1;
    color: #333;
}

.cookie-btn.reject:hover {
    background-color: #e1e1e1;
}

.cookie-btn.customize, .cookie-btn.save {
    background-color: transparent;
    border: 1px solid #f1f1f1;
    color: #f1f1f1;
}

.cookie-btn.customize:hover, .cookie-btn.save:hover {
    background-color: rgba(241, 241, 241, 0.1);
}

/* Cookie customization styles */
.cookie-content.customization {
    flex-direction: column;
    align-items: flex-start;
}

.cookie-options {
    width: 100%;
    margin: 15px 0;
}

.cookie-option {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.cookie-option input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.cookie-option label {
    font-size: 14px;
    line-height: 1.4;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-text {
        margin-bottom: 15px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

/* GDPR Consent Checkbox */
.gdpr-consent {
    margin-bottom: 20px;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.consent-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.consent-checkbox label {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light);
}

.consent-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.consent-checkbox a:hover {
    color: var(--accent-color);
}

/* Footer link styles */
.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--light-color);
    opacity: 0.8;
    transition: var(--transition);
    font-size: 14px;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-links {
        margin: 15px 0;
        justify-content: center;
    }
}

/* ===== ADVANCED TESTIMONIALS ENHANCEMENTS ===== */

/* Enhanced Loading States */
.loading-testimonials {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: rgba(255,255,255,0.8);
}

.loading-testimonials i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error States */
.testimonials-error {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.testimonials-error button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.testimonials-error button:hover {
    background: linear-gradient(135deg, #2980b9, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Enhanced Card Animations */
.testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardSlideIn 0.6s ease forwards;
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
